Accept .zip as an alias for .apkg

The legacy importer does this already, because some web servers and
clients sniff the content type of .apkg files, and "helpfully" rename
them to .zip
This commit is contained in:
Damien Elmes 2022-05-05 21:25:59 +10:00
parent 72389b97be
commit 6a95141fd9

View file

@ -22,7 +22,7 @@ def import_file(mw: aqt.main.AnkiQt, path: str) -> None:
showInfo(tr.importing_anki2_files_are_not_directly_importable())
elif is_collection_package(filename):
maybe_import_collection_package(mw, path)
elif filename.endswith(".apkg"):
elif filename.endswith(".apkg") or filename.endswith(".zip"):
import_anki_package(mw, path)
else:
showWarning(