Commit 72c9faf8 authored by Ivan Tyagov's avatar Ivan Tyagov

We need to explicitly update manifest file when adding a new image otherwise...

We need to explicitly update manifest file when adding a new image otherwise produced file will be corrupted.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43875 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1fb7bc02
...@@ -201,6 +201,8 @@ class OOoBuilder(Implicit): ...@@ -201,6 +201,8 @@ class OOoBuilder(Implicit):
warn('content_type argument must be passed explicitely', FutureWarning) warn('content_type argument must be passed explicitely', FutureWarning)
content_type = mimetypes.guess_type(name)[0] content_type = mimetypes.guess_type(name)[0]
self.addManifest(name, content_type) self.addManifest(name, content_type)
# we need to explicitly update manifest file
self.updateManifest()
self.replace(name, image) self.replace(name, image)
is_legacy = ('oasis.opendocument' not in self.getMimeType()) is_legacy = ('oasis.opendocument' not in self.getMimeType())
return "%s%s" % (is_legacy and '#' or '', name,) return "%s%s" % (is_legacy and '#' or '', name,)
......
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