mirror of
https://github.com/ankitects/anki.git
synced 2025-12-31 07:43:02 -05:00
fix startup error when non-latin text in appdata path
This commit is contained in:
parent
aa71e564a1
commit
e32f88151c
1 changed files with 4 additions and 1 deletions
|
|
@ -243,7 +243,10 @@ and no other programs are accessing your profile folders, then try again."""))
|
||||||
|
|
||||||
def _defaultBase(self):
|
def _defaultBase(self):
|
||||||
if isWin:
|
if isWin:
|
||||||
return os.path.join(os.environ["APPDATA"], "Anki2")
|
from win32com.shell import shell, shellcon
|
||||||
|
loc = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, None, 0)
|
||||||
|
dir = os.path.join(loc, "Anki2")
|
||||||
|
return dir
|
||||||
elif isMac:
|
elif isMac:
|
||||||
return os.path.expanduser("~/Library/Application Support/Anki2")
|
return os.path.expanduser("~/Library/Application Support/Anki2")
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue