remove stale journal file when resetting prefs
This commit is contained in:
parent
83cc2a6ce8
commit
c01ba49168
@ -300,7 +300,10 @@ and no other programs are accessing your profile folders, then try again."""))
|
|||||||
self.db.close()
|
self.db.close()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
os.unlink(path)
|
for suffix in ("", "-journal"):
|
||||||
|
fpath = path + suffix
|
||||||
|
if os.path.exists(fpath):
|
||||||
|
os.unlink(fpath)
|
||||||
QMessageBox.warning(
|
QMessageBox.warning(
|
||||||
None, "Preferences Corrupt", """\
|
None, "Preferences Corrupt", """\
|
||||||
Anki's prefs21.db file was corrupt and has been recreated. If you were using multiple \
|
Anki's prefs21.db file was corrupt and has been recreated. If you were using multiple \
|
||||||
|
Loading…
Reference in New Issue
Block a user