mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -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:
|
||||
raise AnkiError("oldDeckVersion")
|
||||
if ver > 99:
|
||||
# anki 2.0
|
||||
if ver > CURRENT_VERSION:
|
||||
# refuse to load decks created with a future version
|
||||
raise AnkiError("newDeckVersion")
|
||||
return ver
|
||||
runHook("1.x upgrade", db)
|
||||
|
||||
|
|
Loading…
Reference in a new issue