mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Close archive after writing
It gets flushed then and everything. Contributes to issue CURA-4972.
This commit is contained in:
parent
e3e8e8b170
commit
6f833051f8
1 changed files with 3 additions and 1 deletions
|
@ -29,4 +29,6 @@ class UFPWriter(MeshWriter):
|
||||||
thumbnail = archive.getStream("/Metadata/thumbnail.png")
|
thumbnail = archive.getStream("/Metadata/thumbnail.png")
|
||||||
thumbnail.write(open(os.path.join(os.path.dirname(__file__), "kitten.png"), "rb").read())
|
thumbnail.write(open(os.path.join(os.path.dirname(__file__), "kitten.png"), "rb").read())
|
||||||
thumbnail.close()
|
thumbnail.close()
|
||||||
archive.addRelation(virtual_path = "/Metadata/thumbnail.png", file_type = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail")
|
archive.addRelation(virtual_path = "/Metadata/thumbnail.png", file_type = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail")
|
||||||
|
|
||||||
|
archive.close()
|
Loading…
Add table
Add a link
Reference in a new issue