Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision r444.
Original comment by tobias.c...@gmail.com
on 24 Mar 2013 at 2:45
Error is thrown twice because all files were double checked:
* First time in OCFChecker.java:231 when checking the OPF file with opfChecker.runChecks();
* Second time 24 lines later when iterating over every OCF zip entry. Check performed with OCFFilenameChecker.checkCompatiblyEscaped(...);
I suppose, the first check is for checking all OPF manifested files and the
second check for all unmanifested files.
At a first glance, removing the first check makes more sense, because when a
file is manifested in OPF and missing, the OPF check complains about a missing
file and we shouldn't report that the file URI contains spaces. If the file is
present and contains spaces in its name but is unmanifested, the checker would
complain anyway ("exists in the zip file, but is not declared in the OPF file").
BUT: when removing the first check, single OPF file validation with "-mode opf"
wouldn't invoke checkCompatiblyEscaped() anymore. This wouldn't be good.
Therefore my patch provided with r444 only calles checkCompatiblyEscaped() when
'xrefChecker' Object is null which is an indicator for single file validation.
(Had no better possibility in mind since "mode" isn't available in
OPFChecker.java).
Summary: Both EPUB and single OPF file validation still check on broken
filenames, but not twice anymore. I also added additional tests for EPUB 3 and
single OPF file validation.
Original comment by tobias.c...@gmail.com
on 24 Mar 2013 at 2:49
Original comment by tobias.c...@gmail.com
on 24 Mar 2013 at 4:10
Original comment by markus.g...@gmail.com
on 26 Mar 2013 at 10:41
Original issue reported on code.google.com by
tobias.c...@gmail.com
on 8 Jan 2013 at 4:04Attachments: