Skip to content

Commit

Permalink
Update XmlDocumentLayoutLoader.java
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1010010 committed Mar 10, 2020
1 parent b394dad commit edae4cd
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ public Page getPage() {
*/
public String getImageFilePath() {
//Do we have a full path in the XML?
if (page.getImageFilename() != null
&& (page.getImageFilename().startsWith("/") || page.getImageFilename().contains(":"))) {
return page.getImageFilename();
try {
if (page.getImageFilename() != null
&& (page.getImageFilename().startsWith("/") || page.getImageFilename().contains(":"))
&& new File(page.getImageFilename()).exists()) {
return page.getImageFilename();
}
} catch (Exception exc) {
exc.printStackTrace();
}

//Get root folder from XML file path or use resolveDir
String rootFolder = "";
if (resolveDir != null)
Expand Down

0 comments on commit edae4cd

Please sign in to comment.