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