fix startup when prefs.db not readable
If we fail to open the Anki 2.0 prefs.db file, on the second try we need to revert to a new file instead of trying the same broken file again.
This commit is contained in:
parent
ba670c4be1
commit
1824ca1b5d
@ -318,7 +318,7 @@ and no other programs are accessing your profile folders, then try again."""
|
||||
|
||||
opath = os.path.join(self.base, "prefs.db")
|
||||
path = os.path.join(self.base, "prefs21.db")
|
||||
if os.path.exists(opath) and not os.path.exists(path):
|
||||
if not retrying and os.path.exists(opath) and not os.path.exists(path):
|
||||
shutil.copy(opath, path)
|
||||
|
||||
result.firstTime = not os.path.exists(path)
|
||||
|
Loading…
Reference in New Issue
Block a user