mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't remove temporarily inaccesible decks
This commit is contained in:
parent
82081bd7c8
commit
1629c859d0
1 changed files with 3 additions and 5 deletions
|
@ -1063,7 +1063,6 @@ your deck."""))
|
|||
self.updateProgress(_("Checking deck %(x)d of %(y)d...") % {
|
||||
'x': c+1, 'y': len(self.config['recentDeckPaths'])})
|
||||
if not os.path.exists(d):
|
||||
toRemove.append(d)
|
||||
continue
|
||||
try:
|
||||
deck = DeckStorage.Deck(d, backup=False)
|
||||
|
@ -1078,11 +1077,10 @@ your deck."""))
|
|||
})
|
||||
deck.close()
|
||||
except Exception, e:
|
||||
if not "File is in use" in str(e):
|
||||
toRemove.append(d)
|
||||
else:
|
||||
print "ignoring", d
|
||||
if "File is in use" in str(e):
|
||||
continue
|
||||
else:
|
||||
toRemove.append(d)
|
||||
for d in toRemove:
|
||||
self.config['recentDeckPaths'].remove(d)
|
||||
self.config.save()
|
||||
|
|
Loading…
Reference in a new issue