Skip to content

Commit e4cfa6a

Browse files
committed
[bugfix] Windows Path separators are not appropriate for URI
1 parent c7f3873 commit e4cfa6a

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
@@ -159,14 +159,14 @@ private static Source getSource_fromClasspath(final String contextPath, final St
159159
// 1) try resolving location as child
160160
final Path childLocation = rootPath.resolve(location);
161161
try {
162-
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + childLocation.toString());
162+
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + childLocation.toString().replace('\\', '/'));
163163
} catch (final IOException e) {
164164
// no-op, we will try again below
165165
}
166166

167167
// 2) try resolving location as sibling
168168
final Path siblingLocation = rootPath.resolveSibling(location);
169-
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + siblingLocation.toString());
169+
return new ClassLoaderSource(ClassLoaderSource.PROTOCOL + siblingLocation.toString().replace('\\', '/'));
170170
}
171171

172172
/**

0 commit comments

Comments
 (0)