mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
don't allow loading of decks created with future versions
This commit is contained in:
parent
699839188b
commit
e8f1cecd81
1 changed files with 4 additions and 0 deletions
|
@ -203,6 +203,10 @@ def _upgradeSchema(db):
|
||||||
if ver < 65:
|
if ver < 65:
|
||||||
raise AnkiError("oldDeckVersion")
|
raise AnkiError("oldDeckVersion")
|
||||||
if ver > 99:
|
if ver > 99:
|
||||||
|
# anki 2.0
|
||||||
|
if ver > CURRENT_VERSION:
|
||||||
|
# refuse to load decks created with a future version
|
||||||
|
raise AnkiError("newDeckVersion")
|
||||||
return ver
|
return ver
|
||||||
runHook("1.x upgrade", db)
|
runHook("1.x upgrade", db)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue