mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Workspace reader now does a pre-check to see if it's a workspace in the first place
CURA-1263
This commit is contained in:
parent
42be3c7472
commit
9f27e7861f
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,12 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
if quality_changes[0] != instance_container:
|
||||
quality_changes_conflict = True
|
||||
break
|
||||
try:
|
||||
archive.open("Cura/preferences.cfg")
|
||||
except KeyError:
|
||||
# If there is no preferences file, it's not a workspace, so notify user of failure.
|
||||
Logger.log("w", "File %s is not a valid workspace.", file_name)
|
||||
return WorkspaceReader.PreReadResult.failed
|
||||
|
||||
if machine_conflict or quality_changes_conflict or material_conflict:
|
||||
# There is a conflict; User should choose to either update the existing data, add everything as new data or abort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue