treat any backup- prefixed file as a full import

This commit is contained in:
Damien Elmes 2012-12-14 15:41:12 +09:00
parent 259aec9a28
commit 80bb748472

View file

@ -321,7 +321,7 @@ Unable to import from a read-only file."""))
def setupApkgImport(mw, importer): def setupApkgImport(mw, importer):
base = os.path.basename(importer.file).lower() base = os.path.basename(importer.file).lower()
full = (base == "collection.apkg") or re.match("backup-\d+.apkg", base) full = (base == "collection.apkg") or re.match("backup-.*\\.apkg", base)
if not full: if not full:
# adding # adding
return True return True