mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
create backup dir if missing
This commit is contained in:
parent
7c8e612704
commit
bc345d3711
1 changed files with 5 additions and 0 deletions
|
@ -3353,6 +3353,11 @@ nextFactor, reps, thinkingTime, yesCount, noCount from reviewHistory""")
|
|||
path = path.replace(":", "")
|
||||
return path
|
||||
escp = escape(path)
|
||||
# make sure backup dir exists
|
||||
try:
|
||||
os.makedirs(backupDir)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
# find existing backups
|
||||
gen = re.sub("\.anki$", ".backup-(\d+).anki", re.escape(escp))
|
||||
backups = []
|
||||
|
|
Loading…
Reference in a new issue