Windows: The default calibre library location is now not in My Documents but instead in the user home folder

This is because Microsoft now syncs My Documents to OneDrive and
calibre does not work well with multiple programs accessing its files
simultaneously on windows thanks to the mandatory file locking.

Fixes #1787488 [{Enhancement] Welcome Wizard](https://bugs.launchpad.net/calibre/+bug/1787488)
This commit is contained in:
Kovid Goyal 2018-08-22 09:36:43 +05:30
parent aae106cdf3
commit c8d6a703c7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -763,13 +763,6 @@ class LibraryPage(QWizardPage, LibraryUI):
base = os.path.expanduser(u'~') base = os.path.expanduser(u'~')
except ValueError: except ValueError:
base = QDir.homePath().replace('/', os.sep) base = QDir.homePath().replace('/', os.sep)
if iswindows:
try:
x = winutil.special_folder_path(winutil.CSIDL_PERSONAL)
except ValueError:
x = QDir.homePath().replace('/', os.sep)
if x and os.access(x, os.W_OK):
base = x
lp = os.path.join(base, fname) lp = os.path.join(base, fname)
self.default_library_name = lp self.default_library_name = lp