Skip to content

Commit 7e310bc

Browse files
author
Aleksandar Gradinac
committed
[GR-32195] Fix resource inclusion on Windows.
PullRequest: graal/9190
2 parents e2b0b70 + b451eb5 commit 7e310bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ResourcesFeature.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ private static void scanDirectory(DebugContext debugContext, File root, Pattern[
259259
String relativeFilePath = "";
260260
if (file != root) {
261261
relativeFilePath = file.getAbsolutePath().substring(root.getAbsolutePath().length() + 1);
262+
/*
263+
* Java resources always use / as the path separator, as do our resource inclusion
264+
* patterns.
265+
*/
266+
relativeFilePath = relativeFilePath.replace(File.separatorChar, '/');
262267
}
263268
if (file.isDirectory()) {
264269
if (!relativeFilePath.isEmpty()) {

0 commit comments

Comments
 (0)