return if numBackups = 0

This commit is contained in:
Damien Elmes 2009-06-04 05:17:36 +09:00
parent 4d1ea887dd
commit 3e40dc1557

View file

@ -3164,7 +3164,7 @@ 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")):
if not numBackups:
return
if not os.path.exists(backupDir):
os.makedirs(backupDir)