From b58141b1b81f6713755e021de54efecf66dd76c6 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Thu, 5 May 2011 16:50:12 -0300 Subject: [PATCH] Fix path issue during export. --- .../src/main/java/com/wisemapping/exporter/ExporterFactory.java | 2 +- .../src/test/java/com/wisemapping/test/export/ExportTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index fb001a05..1435b672 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -217,7 +217,7 @@ public class ExporterFactory { if (imgUrl.contains("images")) { imgPath = imgBaseUrl + "/../images/" + iconName; } else { - imgPath = imgBaseUrl + imgUrl; + imgPath = imgBaseUrl + "/" + imgUrl; } elem.setAttribute("xlink:href", imgPath); elem.appendChild(document.createTextNode(" ")); diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java index 0d074cd3..fd1e27f3 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java @@ -42,7 +42,7 @@ public class ExportTest { final ExportProperties properties = ExportProperties.create(format); final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties; imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE); - String baseUrl = "file://"+svgFile.getParentFile().getAbsolutePath()+"/../../../main/webapp/icons/"; + String baseUrl = "file://"+svgFile.getParentFile().getAbsolutePath()+"/../../../main/webapp/icons"; properties.setBaseImagePath(baseUrl); // Write content ...