yet another file locking bug: must close prefs.db before moving

This commit is contained in:
Damien Elmes 2014-07-07 13:18:00 +09:00
parent bbefeb0cfd
commit 1099b743b7

View file

@ -231,6 +231,11 @@ 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
if self.db:
try:
self.db.close()
except:
pass
broken = path+".broken"
if os.path.exists(broken):
os.unlink(broken)