mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
add support for turning off backups
This commit is contained in:
parent
5a912faeab
commit
06b1ee47f9
1 changed files with 2 additions and 0 deletions
|
@ -2980,6 +2980,8 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
|
||||||
path = os.path.join(backupDir, path)
|
path = os.path.join(backupDir, path)
|
||||||
path = re.sub("\.anki$", ".backup-%d.anki" % num, path)
|
path = re.sub("\.anki$", ".backup-%d.anki" % num, path)
|
||||||
return path
|
return path
|
||||||
|
if os.path.exists(backupDir.replace("backups", "nobackups")):
|
||||||
|
return
|
||||||
if not os.path.exists(backupDir):
|
if not os.path.exists(backupDir):
|
||||||
os.makedirs(backupDir)
|
os.makedirs(backupDir)
|
||||||
# if the mod time is identical, don't make a new backup
|
# if the mod time is identical, don't make a new backup
|
||||||
|
|
Loading…
Reference in a new issue