Commit d64f11aa authored by Gabriel Monnerat's avatar Gabriel Monnerat

Add condition to not replace the manifest it already exists. It was added to...

Add condition to not replace the manifest it already exists. It was added to fix the issue when a dynamic image is added on style.xml. The manifest is replaced and turns the document invalid
parent 853a1275
...@@ -528,7 +528,9 @@ class OOoTemplate(ZopePageTemplate): ...@@ -528,7 +528,9 @@ class OOoTemplate(ZopePageTemplate):
if self.OLE_documents_zipstring: if self.OLE_documents_zipstring:
additional_builder = OOoBuilder( self.OLE_documents_zipstring ) additional_builder = OOoBuilder( self.OLE_documents_zipstring )
for name in additional_builder.getNameList(): for name in additional_builder.getNameList():
ooo_builder.replace(name, additional_builder.extract(name) ) if name not in ('META-INF/manifest.xml',):
# We don't replace manifest
ooo_builder.replace(name, additional_builder.extract(name) )
# Update the META informations # Update the META informations
ooo_builder.updateManifest() ooo_builder.updateManifest()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment