-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The current implementation of the --resolve-dir
option prefixes an image path passed on the command line unconditionally:
prima-page-viewer/src/org/primaresearch/page/viewer/PageViewer.java
Lines 72 to 73 in ad75ac2
if (imageFilePath != null && resolveDir != null) | |
imageFilePath = resolveDir + (resolveDir.endsWith(File.separator) ? "" : File.separator) + imageFilePath; |
This is not correct IMHO: On the command line, relative paths should resolve to the CWD, and absolute paths should not be prefixed by anything.
In contrast, image paths parsed from the XML are already prefixed correctly:
prima-page-viewer/src/org/primaresearch/page/viewer/dla/XmlDocumentLayoutLoader.java
Lines 72 to 74 in ad75ac2
if (page.getImageFilename() != null | |
&& (page.getImageFilename().startsWith("/") || page.getImageFilename().contains(":")) | |
&& new File(page.getImageFilename()).exists()) { |
Metadata
Metadata
Assignees
Labels
No labels