Start: Fixed freeze when trying to read corrupt fcstd file

This commit is contained in:
Yorik van Havre
2018-10-03 16:33:11 -03:00
parent a6f7ca483e
commit 27c80884a1

View File

@@ -106,7 +106,11 @@ def getInfo(filename):
# get additional info from fcstd files
if filename.lower().endswith(".fcstd"):
zfile=zipfile.ZipFile(filename)
try:
zfile=zipfile.ZipFile(filename)
except:
print("Cannot read file: ",filename)
return None
files=zfile.namelist()
# check for meta-file if it's really a FreeCAD document
if files[0] == "Document.xml":