make sure we don't rename to existing prefs.db.broken
This commit is contained in:
parent
760e16dfbf
commit
bbefeb0cfd
@ -231,7 +231,10 @@ and no other programs are accessing your profile folders, then try again."""))
|
||||
new = not os.path.exists(path)
|
||||
def recover():
|
||||
# if we can't load profile, start with a new one
|
||||
os.rename(path, path+".broken")
|
||||
broken = path+".broken"
|
||||
if os.path.exists(broken):
|
||||
os.unlink(broken)
|
||||
os.rename(path, broken)
|
||||
QMessageBox.warning(
|
||||
None, "Preferences Corrupt", """\
|
||||
Anki's prefs.db file was corrupt and has been recreated. If you were using multiple \
|
||||
|
Loading…
Reference in New Issue
Block a user