From dfd88cc4c1f25ba59f4c187ec09dc7c5cf7c5845 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 6 Feb 2010 01:20:50 +0900 Subject: [PATCH] don't set modtime of 0 --- anki/deck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/deck.py b/anki/deck.py index d734728e0..288b8ae2f 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -3381,7 +3381,8 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""") re.sub("\.anki$", ".backup-%s.anki" % n, escp))) shutil.copy2(path, newpath) # 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 if len(backups) + 1 > numBackups: delete = len(backups) + 1 - numBackups