mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
catch more invalid zip file errors
This commit is contained in:
parent
a430803774
commit
9ec91724bf
1 changed files with 1 additions and 1 deletions
|
@ -313,8 +313,8 @@ backup, please see the 'Backups' section of the user manual."""))
|
||||||
else:
|
else:
|
||||||
# if it's an apkg/zip, first test it's a valid file
|
# if it's an apkg/zip, first test it's a valid file
|
||||||
if importer.__class__.__name__ == "AnkiPackageImporter":
|
if importer.__class__.__name__ == "AnkiPackageImporter":
|
||||||
z = zipfile.ZipFile(importer.file)
|
|
||||||
try:
|
try:
|
||||||
|
z = zipfile.ZipFile(importer.file)
|
||||||
z.getinfo("collection.anki2")
|
z.getinfo("collection.anki2")
|
||||||
except:
|
except:
|
||||||
showWarning(invalidZipMsg())
|
showWarning(invalidZipMsg())
|
||||||
|
|
Loading…
Reference in a new issue