mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
revert modtime after deck closed in deck browser
This commit is contained in:
parent
68ab1244fc
commit
4a3114155b
1 changed files with 2 additions and 0 deletions
|
@ -1090,6 +1090,7 @@ your deck."""))
|
|||
toRemove.append(d)
|
||||
continue
|
||||
try:
|
||||
mod = os.stat(d)[stat.ST_MTIME]
|
||||
deck = DeckStorage.Deck(d, backup=False)
|
||||
self.browserDecks.append({
|
||||
'path': d,
|
||||
|
@ -1101,6 +1102,7 @@ your deck."""))
|
|||
'reps': deck._dailyStats.reps,
|
||||
})
|
||||
deck.close()
|
||||
os.utime(d, (mod, mod))
|
||||
except Exception, e:
|
||||
if "File is in use" in str(e):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue