mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08: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
@ -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…
x
Reference in New Issue
Block a user