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