make sure users can unload corrupt collection to create new profile

This commit is contained in:
Damien Elmes 2014-07-02 06:29:53 +09:00
parent 06b61fc2c7
commit e5a2a9c3f8

View file

@ -303,8 +303,13 @@ Debug info:
if self.col:
if not self.closeAllCollectionWindows():
return
self.maybeOptimize()
self.progress.start(immediate=True)
corrupt = False
try:
self.maybeOptimize()
except:
corrupt = True
if not corrupt:
if os.getenv("ANKIDEV", 0):
corrupt = False
else: