diff --git a/aqt/profiles.py b/aqt/profiles.py index 37db4e12d..a436e907d 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -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 \