mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -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:
|
||||
# if it's an apkg/zip, first test it's a valid file
|
||||
if importer.__class__.__name__ == "AnkiPackageImporter":
|
||||
z = zipfile.ZipFile(importer.file)
|
||||
try:
|
||||
z = zipfile.ZipFile(importer.file)
|
||||
z.getinfo("collection.anki2")
|
||||
except:
|
||||
showWarning(invalidZipMsg())
|
||||
|
|
Loading…
Reference in a new issue