From b20be85375e83f33855ce326a15be6275bac820f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 22 Aug 2018 09:39:19 +0530 Subject: [PATCH] Another place where My Documents was used on windows --- src/calibre/gui2/main.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 0e10e508a8..91154d1e9a 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -146,14 +146,9 @@ def get_library_path(gui_runner): library_path = prefs['library_path'] if library_path is None: # Need to migrate to new database layout base = os.path.expanduser('~') - if iswindows: - try: - base = winutil.special_folder_path(winutil.CSIDL_PERSONAL) - except ValueError: - base = None - if not base or not os.path.exists(base): - from PyQt5.Qt import QDir - base = unicode(QDir.homePath()).replace('/', os.sep) + if not base or not os.path.exists(base): + from PyQt5.Qt import QDir + base = unicode(QDir.homePath()).replace('/', os.sep) candidate = gui_runner.choose_dir(base) if not candidate: candidate = os.path.join(base, 'Calibre Library')