don't keep upgrading on mac

This commit is contained in:
Damien Elmes 2008-11-21 20:18:48 +09:00
parent 1570f65c48
commit 1656c2fbca

View file

@ -30,7 +30,8 @@ class Config(dict):
self.configPath = os.path.expanduser( self.configPath = os.path.expanduser(
"~/Library/Application Support/Anki") "~/Library/Application Support/Anki")
# upgrade? # upgrade?
if os.path.exists(oldDb): if (not os.path.exists(self.configPath) and
os.path.exists(oldDb)):
self.makeAnkiDir() self.makeAnkiDir()
newDb = self.getDbPath() newDb = self.getDbPath()
shutil.copy2(oldDb, newDb) shutil.copy2(oldDb, newDb)