don't allow loading of decks created with future versions

This commit is contained in:
Damien Elmes 2011-09-24 07:30:34 +09:00
parent 699839188b
commit e8f1cecd81

View file

@ -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)