Skip to content

Commit

Permalink
Merge pull request #815 from nickgaya/patch-1
Browse files Browse the repository at this point in the history
Normalize path separators in WebDriverManager.zipFolder()
  • Loading branch information
bonigarcia authored Apr 8, 2022
2 parents 922c79b + 639e532 commit c17f94b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import static javax.xml.xpath.XPathFactory.newInstance;
import static org.apache.commons.io.FileUtils.cleanDirectory;
import static org.apache.commons.io.FilenameUtils.removeExtension;
import static org.apache.commons.io.FilenameUtils.separatorsToUnix;
import static org.apache.commons.lang3.StringUtils.isNumeric;
import static org.apache.commons.lang3.SystemUtils.IS_OS_LINUX;
import static org.slf4j.LoggerFactory.getLogger;
Expand Down Expand Up @@ -334,7 +335,7 @@ public static Path zipFolder(Path sourceFolder) {
Stream<Path> paths = Files.walk(sourceFolder)) {
paths.filter(path -> !Files.isDirectory(path)).forEach(path -> {
ZipEntry zipEntry = new ZipEntry(
sourceFolder.relativize(path).toString());
separatorsToUnix(sourceFolder.relativize(path).toString()));
try {
zipOutputStream.putNextEntry(zipEntry);
Files.copy(path, zipOutputStream);
Expand Down

0 comments on commit c17f94b

Please sign in to comment.