Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2017-03-30 20:04:18 +02:00
commit e0c77231e0

View file

@ -1235,6 +1235,7 @@ class CuraApplication(QtApplication):
"""
Checks if the given file URL is a valid project file.
"""
try:
file_path = QUrl(file_url).toLocalFile()
workspace_reader = self.getWorkspaceFileHandler().getReaderForFile(file_path)
if workspace_reader is None:
@ -1242,3 +1243,6 @@ class CuraApplication(QtApplication):
result = workspace_reader.preRead(file_path, show_dialog=False)
return result == WorkspaceReader.PreReadResult.accepted
except Exception as e:
Logger.log("e", "Could not check file %s: %s", file_url, e)
return False