]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/spring/SpringUtils.java
Integrate detached with standard SLC
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / spring / SpringUtils.java
index 2b7569f882891cc29ee7e7ed070b19a3b5a4936a..798b5648e28e1f35bfe6433866f17f0ba8384e3a 100644 (file)
@@ -55,9 +55,9 @@ public class SpringUtils {
        public static String extractRelativePath(Resource ancestor, Resource child) {\r
                try {\r
 \r
-                       return ancestor.getURI().relativize(child.getURI()).normalize()\r
-                                       .toString();\r
-               } catch (IOException e) {\r
+                       return ancestor.getURL().toURI().relativize(child.getURL().toURI())\r
+                                       .normalize().toString();\r
+               } catch (Exception e) {\r
                        throw new SlcException("Cannot extract relative path of " + child\r
                                        + " based on " + ancestor, e);\r
                }\r