change default Anki folder location on Linux to Documents/Anki

(leave in ~/Anki for existing installs)
This commit is contained in:
Soren I. Bjornstad 2014-06-26 10:55:45 -05:00
parent 46a38f843e
commit 4619933e7e

View File

@ -204,7 +204,12 @@ a flash drive.""" % self.base)
elif isMac:
return os.path.expanduser("~/Documents/Anki")
else:
return os.path.expanduser("~/Anki")
# use Documents/Anki on new installs, ~/Anki on existing ones
p = os.path.expanduser("~/Anki")
if os.path.exists(p):
return p
else:
return os.path.expanduser("~/Documents/Anki")
def _loadMeta(self):
path = os.path.join(self.base, "prefs.db")