w3c / epubcheck

The conformance checker for EPUB publications
https://www.w3.org/publishing/epubcheck/
BSD 3-Clause "New" or "Revised" License
1.65k stars 402 forks source link

When running in exp mode, filenames have an .epub extension added to them #1253

Open acabal opened 3 years ago

acabal commented 3 years ago

Consider the following:

mkdir /tmp/test_epub
java -jar epubcheck_path -mode exp /tmp/test_epub

Output:

No mimetype file found in expanded publication, output archive will be invalid
ERROR(PKG-003): ./test_epub.epub(-1,-1): Unable to read EPUB file header. This is likely a corrupted EPUB file.
FATAL(RSC-002): ./test_epub.epub(-1,-1): Required META-INF/container.xml resource could not be found.
ERROR(RSC-001): ./test_epub.epub(-1,-1): File "META-INF/container.xml" could not be found.

Check finished with errors
Messages: 1 fatal / 2 errors / 0 warnings / 0 infos

EPUBCheck completed

Notice how the files in the output are listed as ./test_epub.epub, i.e., epubcheck has added .epub to the directory name. This occurs with all errors epubcheck outputs.

This is incorrect; the directory does not have the .epub extension. Programs parsing the output will have to know to remove the extension to get the actual file path.

rdeltour commented 1 year ago

Good suggestion 👍. But I'm postponing this to when we rework the messaging facility, in a later version.