mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Another place where My Documents was used on windows
This commit is contained in:
parent
c8d6a703c7
commit
b20be85375
@ -146,14 +146,9 @@ def get_library_path(gui_runner):
|
|||||||
library_path = prefs['library_path']
|
library_path = prefs['library_path']
|
||||||
if library_path is None: # Need to migrate to new database layout
|
if library_path is None: # Need to migrate to new database layout
|
||||||
base = os.path.expanduser('~')
|
base = os.path.expanduser('~')
|
||||||
if iswindows:
|
if not base or not os.path.exists(base):
|
||||||
try:
|
from PyQt5.Qt import QDir
|
||||||
base = winutil.special_folder_path(winutil.CSIDL_PERSONAL)
|
base = unicode(QDir.homePath()).replace('/', os.sep)
|
||||||
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)
|
|
||||||
candidate = gui_runner.choose_dir(base)
|
candidate = gui_runner.choose_dir(base)
|
||||||
if not candidate:
|
if not candidate:
|
||||||
candidate = os.path.join(base, 'Calibre Library')
|
candidate = os.path.join(base, 'Calibre Library')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user