Skip to content

Commit 8bf5b8a

Browse files
committed
[bugfix] Windows Path separators are not appropriate for URI
1 parent 57ec871 commit 8bf5b8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/org/exist/source/SourceFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ private static Source getSource_fromClasspath(final String contextPath, final St
168168
// 1) try resolving location as child
169169
final Path childLocation = rootPath.resolve(location);
170170
try {
171-
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + childLocation.toString());
171+
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + childLocation.toString().replace('\\', '/'));
172172
} catch (final IOException e) {
173173
// no-op, we will try again below
174174
}
175175

176176
// 2) try resolving location as sibling
177177
final Path siblingLocation = rootPath.resolveSibling(location);
178-
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + siblingLocation.toString());
178+
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + siblingLocation.toString().replace('\\', '/'));
179179
}
180180

181181
/**

0 commit comments

Comments
 (0)