Skip to content

Commit

Permalink
fix(): namespaces files working in script tasks on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye authored and brian-mulier-p committed Jun 17, 2024
1 parent fcada08 commit 30e4fe4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th

@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
uris.add(URI.create(file.toString()));
uris.add(URI.create(file.toString().replace("\\", "/")));
return FileVisitResult.CONTINUE;
}

Expand All @@ -90,7 +90,7 @@ public FileVisitResult visitFileFailed(Path file, IOException exc) {
}
});

URI fsPathUri = URI.create(fsPath.toString());
URI fsPathUri = URI.create(fsPath.toString().replace("\\", "/"));
return uris.stream().sorted(Comparator.reverseOrder())
.map(fsPathUri::relativize)
.map(URI::getPath)
Expand Down

0 comments on commit 30e4fe4

Please sign in to comment.