Skip to content

Commit

Permalink
Always use / as the path separator for jar entries
Browse files Browse the repository at this point in the history
Fixes #5260

PiperOrigin-RevId: 198110476
  • Loading branch information
cushon authored and Copybara-Service committed May 25, 2018
1 parent e29c183 commit 10141a3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.jimfs.Configuration;
Expand Down Expand Up @@ -105,7 +106,9 @@ static JavacTurbineCompileResult compile(JavacTurbineCompileRequest request) thr
@Override
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs)
throws IOException {
files.put(classes.relativize(path).toString(), Files.readAllBytes(path));
// use `/` as the directory separator for jar paths, even on Windows
String name = Joiner.on('/').join(classes.relativize(path));
files.put(name, Files.readAllBytes(path));
return FileVisitResult.CONTINUE;
}
});
Expand Down

0 comments on commit 10141a3

Please sign in to comment.