mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Better path to packages.json in the 3MF file
Let's put it in the Cura directory with the rest of such files, as to not muddy the 3MF file with all sorts of directories that are not known to other consumers. Contributes to issue CURA-9413.
This commit is contained in:
parent
d1747e09e1
commit
8970f46154
2 changed files with 3 additions and 3 deletions
|
@ -1253,12 +1253,12 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
@staticmethod
|
||||
def _parse_packages_metadata(archive: zipfile.ZipFile) -> List[Dict[str, str]]:
|
||||
try:
|
||||
package_metadata = json.loads(archive.open("Metadata/packages.json").read().decode("utf-8"))
|
||||
package_metadata = json.loads(archive.open("Cura/packages.json").read().decode("utf-8"))
|
||||
return package_metadata["packages"]
|
||||
except KeyError:
|
||||
Logger.warning("No package metadata was found in .3mf file.")
|
||||
except Exception:
|
||||
Logger.error("Failed to load packes metadata from .3mf file")
|
||||
Logger.error("Failed to load packages metadata from .3mf file.")
|
||||
|
||||
return []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue