View Single Post
Old 03-20-2021, 10:07 PM   #24
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,930
Karma: 6361444
Join Date: Nov 2009
Device: many
Essentially we do that on import but use the existing opf to guide that. The opf is supposed to have a valid manifest and files not listed in the manifest should be ignored. The opf should also have a spine indicating the order of the xhtml files. That spine order uses the manifest ids assigned to each valid file. So having a valid opf is important. No epub should ever be without one.

There are also file naming/path issues that can cause security concerns for maliciously crafted epub/zip archives.

So the best way to handle this is for the original epub to have a proper valid opf, manifest and spine included.

If not, you can still open this epub in Sigil by unzipping it and using Add Existing to add the xhtml files and Sigil will properly create a manifest. You would have to determine the correct spine order from a toc or from other sources.

So just ignoring the manifest and/or the opf is typically not a good idea. It can be worked around if broken and that is what we are discussing.



Quote:
Originally Posted by Thasaidon View Post
This is a question asked from technical ignorance and I ask as sometimes asking such questions has lead to coming up with an elegant novel solution.

Rather than trying to fix the manifest would it be easier/cause less problems to generate a new one?
KevinH is offline