From 27c80884a16d6673b60cd871e00d28f4a5dd1f28 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 3 Oct 2018 16:33:11 -0300 Subject: [PATCH] Start: Fixed freeze when trying to read corrupt fcstd file --- src/Mod/Start/StartPage/StartPage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 74d058e203..51d31268c2 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -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":