https://bugs.documentfoundation.org/show_bug.cgi?id=131025

--- Comment #16 from Eike Rathke <[email protected]> ---
(In reply to Jim DeLaHunt from comment #15)
> Once I edited contents.xml, re-zipped the document directory, and opened the
> new .odt file in LibreOffice, I saw a "document corrupted" message
That probably because this

(In reply to Mark van Rossum from comment #12)
> * zip file_new.odt *
> LO will see it is broken but can repair it.
zipping everything is wrong (apart from that it lacks subdirectories). Instead,
copy the old document to file_new.odt and then *freshen* the zip using

zip -f file_new.odt content.xml

The reason is that the 'mimetype' file
a) MUST be the first entry in the zip
b) MUST be stored uncompressed plain text

Zipping everything (in shell expansion order if * is used) will violate both.

Alternatively, of course in a subdirectory that *only* contains the document's
files and directories, create a new zip with

zip -0 file_new.odt mimetype
zip -r file_new.odt * -x mimetype

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to