Skip to content

Commit a3aa326

Browse files
authored
Create target directories before copying file (#16739)
fixes #16738
1 parent c416bf6 commit a3aa326

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

java/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ public void downloadFile(String fileName, Path targetLocation) throws IOExceptio
734734

735735
Contents.Supplier content = (Contents.Supplier) response.getValue();
736736
try (InputStream fileContent = content.get()) {
737+
Files.createDirectories(targetLocation);
737738
Files.copy(new BufferedInputStream(fileContent), targetLocation.resolve(fileName));
738739
}
739740
}

0 commit comments

Comments
 (0)