From 6a95141fd9a0866e9afa41eb146d963e905d0c84 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 5 May 2022 21:25:59 +1000 Subject: [PATCH] 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 --- qt/aqt/import_export/importing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/import_export/importing.py b/qt/aqt/import_export/importing.py index 21d58a17d..4f8ecdf65 100644 --- a/qt/aqt/import_export/importing.py +++ b/qt/aqt/import_export/importing.py @@ -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(