ditaa-HTMLConverter.patch 1.2 KB

123456789101112131415161718192021
  1. --- ditaa.orig/src/org/stathissideris/ascii2image/core/HTMLConverter.java 2016-12-05 23:24:13.155516000 -0500
  2. +++ ditaa/src/org/stathissideris/ascii2image/core/HTMLConverter.java 2016-12-05 23:41:09.816397101 -0500
  3. @@ -161,7 +161,7 @@
  4. System.out.println("Generating diagrams... ");
  5. - File imageDir = new File(new File(targetFilename).getParent() + File.separator + imageDirName);
  6. + File imageDir = new File(new File(targetFilename).getAbsoluteFile().getParent() + File.separator + imageDirName);
  7. if(!imageDir.exists()){
  8. if(!imageDir.mkdir()){
  9. System.err.println("Could not create directory " + imageDirName);
  10. @@ -171,7 +171,7 @@
  11. for(String URL : diagramList.keySet()) {
  12. String text = (String) diagramList.get(URL);
  13. - String imageFilename = new File(targetFilename).getParent() + File.separator + URL;
  14. + String imageFilename = new File(targetFilename).getAbsoluteFile().getParent() + File.separator + URL;
  15. if(new File(imageFilename).exists() && !options.processingOptions.overwriteFiles()){
  16. System.out.println("Error: Cannot overwrite file "+URL+", file already exists." + " Use the --overwrite option if you would like to allow file overwrite.");
  17. continue;