mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
use Documents/Anki (in English) if no DocumentsLocation
Otherwise it gets created directly in the home folder, which is confusing when you would expect that only to happen on older installs which previously used it.
This commit is contained in:
parent
23cec2d5e9
commit
9e69da6c9a
1 changed files with 8 additions and 1 deletions
|
@ -224,6 +224,13 @@ and no other programs are accessing your profile folders, then try again."""))
|
||||||
return p
|
return p
|
||||||
else:
|
else:
|
||||||
loc = QDesktopServices.storageLocation(QDesktopServices.DocumentsLocation)
|
loc = QDesktopServices.storageLocation(QDesktopServices.DocumentsLocation)
|
||||||
|
if loc[:-1] == QDesktopServices.storageLocation(
|
||||||
|
QDesktopServices.HomeLocation):
|
||||||
|
# occasionally "documentsLocation" will return the home
|
||||||
|
# folder because the Documents folder isn't configured
|
||||||
|
# properly; fall back to an English path
|
||||||
|
return os.path.expanduser("~/Documents/Anki")
|
||||||
|
else:
|
||||||
return os.path.join(loc, "Anki")
|
return os.path.join(loc, "Anki")
|
||||||
|
|
||||||
def _loadMeta(self):
|
def _loadMeta(self):
|
||||||
|
|
Loading…
Reference in a new issue