mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
if profile fails to load, revert back to profile manager
This commit is contained in:
parent
fd1116938c
commit
cec679e059
1 changed files with 8 additions and 1 deletions
|
@ -249,7 +249,14 @@ To import into a password protected profile, please open the profile before atte
|
|||
|
||||
def loadCollection(self):
|
||||
self.hideSchemaMsg = True
|
||||
self.col = Collection(self.pm.collectionPath())
|
||||
try:
|
||||
self.col = Collection(self.pm.collectionPath())
|
||||
except:
|
||||
# move back to profile manager
|
||||
showWarning("""\
|
||||
Your collection is corrupt. Please see the manual for \
|
||||
how to restore from a backup.""")
|
||||
return self.unloadProfile()
|
||||
self.hideSchemaMsg = False
|
||||
self.progress.setupDB(self.col.db)
|
||||
self.moveToState("deckBrowser")
|
||||
|
|
Loading…
Reference in a new issue