mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
fix schema not being modified on backup import
This commit is contained in:
parent
4acebfdf52
commit
8e944c6a02
1 changed files with 1 additions and 2 deletions
|
@ -380,7 +380,6 @@ def setupApkgImport(mw, importer):
|
||||||
if not full:
|
if not full:
|
||||||
# adding
|
# adding
|
||||||
return True
|
return True
|
||||||
backup = re.match("backup-.*\\.apkg", base)
|
|
||||||
if not mw.restoringBackup and not askUser(_("""\
|
if not mw.restoringBackup and not askUser(_("""\
|
||||||
This will delete your existing collection and replace it with the data in \
|
This will delete your existing collection and replace it with the data in \
|
||||||
the file you're importing. Are you sure?"""), msgfunc=QMessageBox.warning,
|
the file you're importing. Are you sure?"""), msgfunc=QMessageBox.warning,
|
||||||
|
@ -389,7 +388,7 @@ the file you're importing. Are you sure?"""), msgfunc=QMessageBox.warning,
|
||||||
# schedule replacement; don't do it immediately as we may have been
|
# schedule replacement; don't do it immediately as we may have been
|
||||||
# called as part of the startup routine
|
# called as part of the startup routine
|
||||||
mw.progress.timer(
|
mw.progress.timer(
|
||||||
100, lambda mw=mw, f=importer.file: replaceWithApkg(mw, f, backup), False)
|
100, lambda mw=mw, f=importer.file: replaceWithApkg(mw, f, mw.restoringBackup), False)
|
||||||
|
|
||||||
def replaceWithApkg(mw, file, backup):
|
def replaceWithApkg(mw, file, backup):
|
||||||
mw.unloadCollection(lambda: _replaceWithApkg(mw, file, backup))
|
mw.unloadCollection(lambda: _replaceWithApkg(mw, file, backup))
|
||||||
|
|
Loading…
Reference in a new issue