|
28 | 28 | import static guru.nidi.graphviz.engine.GraphvizLoader.readAsBytes; |
29 | 29 | import static guru.nidi.graphviz.engine.StringFunctions.replaceNonWordChars; |
30 | 30 | import static guru.nidi.graphviz.engine.TempFiles.tempDir; |
31 | | -import static guru.nidi.graphviz.service.SystemUtils.relativeUriPathOf; |
32 | 31 | import static guru.nidi.graphviz.service.SystemUtils.uriPathOf; |
33 | 32 | import static java.lang.Integer.parseInt; |
34 | 33 | import static java.util.Locale.ENGLISH; |
@@ -148,7 +147,7 @@ public String originalImagePath(String processPath) { |
148 | 147 | private String completePath(String path) { |
149 | 148 | return isUrl(path) || new File(path).isAbsolute() || basedir.getPath().equals(".") |
150 | 149 | ? path |
151 | | - : relativeUriPathOf(new File(basedir, path).getPath()); |
| 150 | + : uriPathOf(new File(basedir, path).getPath()); |
152 | 151 | } |
153 | 152 |
|
154 | 153 | static boolean isUrl(String path) { |
@@ -219,9 +218,9 @@ static Image create(String path, String completePath) { |
219 | 218 | final OutputStream out = new FileOutputStream(file)) { |
220 | 219 | out.write(readAsBytes(in)); |
221 | 220 | } |
222 | | - System.out.println("******************" + file + " " + file.exists()); |
223 | 221 | final BufferedImage image = ImageIO.read(file); |
224 | | - return new Image(path, file.getAbsolutePath(), image.getWidth(), image.getHeight()); |
| 222 | + System.out.println("******************" + file + " " + uriPathOf(file) + " " + file.exists() + " " + image.getWidth()); |
| 223 | + return new Image(path, uriPathOf(file), image.getWidth(), image.getHeight()); |
225 | 224 | } |
226 | 225 | final BufferedImage image = ImageIO.read(new File(completePath)); |
227 | 226 | return new Image(completePath, uriPathOf(new File(completePath)), image.getWidth(), image.getHeight()); |
|
0 commit comments