add support for turning off backups

This commit is contained in:
Damien Elmes 2009-04-14 00:08:56 +09:00
parent 5a912faeab
commit 06b1ee47f9

View file

@ -2980,6 +2980,8 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
path = os.path.join(backupDir, path)
path = re.sub("\.anki$", ".backup-%d.anki" % num, path)
return path
if os.path.exists(backupDir.replace("backups", "nobackups")):
return
if not os.path.exists(backupDir):
os.makedirs(backupDir)
# if the mod time is identical, don't make a new backup