Skip to content

Commit 4c3239d

Browse files
committed
[java] Fixing paths to work on Windows
1 parent c6a31d8 commit 4c3239d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/client/src/org/openqa/selenium/devtools/CdpClientGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static void main(String[] args) throws IOException {
8484
Files.walkFileTree(target, new SimpleFileVisitor<Path>() {
8585
@Override
8686
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
87-
String relative = target.relativize(dir).toString();
87+
String relative = target.relativize(dir).toString().replace('\\', '/');
8888
JarEntry entry = new JarEntry(devtoolsDir + relative + "/");
8989
jos.putNextEntry(entry);
9090
jos.closeEntry();
@@ -94,7 +94,7 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th
9494

9595
@Override
9696
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
97-
String relative = target.relativize(file).toString();
97+
String relative = target.relativize(file).toString().replace('\\', '/');
9898
JarEntry entry = new JarEntry(devtoolsDir + relative);
9999
jos.putNextEntry(entry);
100100
try (InputStream is = Files.newInputStream(file)) {

0 commit comments

Comments
 (0)