Skip to content

Commit 7ec46d4

Browse files
committed
Experiment w/ windows URIs
1 parent 7884f76 commit 7ec46d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

key.core/src/main/java/de/uka/ilkd/key/nparser/builder/IncludeFinder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ private void addInclude(String filename) throws MalformedURLException {
6060
// whatsoever
6161
filename = filename.replace('\\', File.separatorChar); // Special handling for Linux
6262
var path = base.resolve(filename).normalize();
63-
var uri = URI.create(path.toString());
63+
String pathString = path.toString().replace(File.separatorChar, '/'); // URIs on Windows
64+
// needs slash
65+
var uri = URI.create(pathString);
6466
if (uri.getScheme() == null) {
65-
uri = URI.create("file://" + path);
67+
uri = URI.create("file://" + pathString);
6668
}
6769
URL url = uri.toURL();
6870
source = RuleSourceFactory.initRuleFile(url);

0 commit comments

Comments
 (0)