mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
don't set modtime of 0
This commit is contained in:
parent
c659660864
commit
dfd88cc4c1
1 changed files with 2 additions and 1 deletions
|
@ -3381,7 +3381,8 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
|
||||||
re.sub("\.anki$", ".backup-%s.anki" % n, escp)))
|
re.sub("\.anki$", ".backup-%s.anki" % n, escp)))
|
||||||
shutil.copy2(path, newpath)
|
shutil.copy2(path, newpath)
|
||||||
# set mtimes to be identical
|
# set mtimes to be identical
|
||||||
os.utime(newpath, (deck.modified, deck.modified))
|
if deck.modified:
|
||||||
|
os.utime(newpath, (deck.modified, deck.modified))
|
||||||
# remove if over
|
# remove if over
|
||||||
if len(backups) + 1 > numBackups:
|
if len(backups) + 1 > numBackups:
|
||||||
delete = len(backups) + 1 - numBackups
|
delete = len(backups) + 1 - numBackups
|
||||||
|
|
Loading…
Reference in a new issue