Skip to content

Commit

Permalink
Create the download directory if it doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Dec 6, 2023
1 parent ce1f0b2 commit a6a4475
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private static boolean copyURLToFileIfNewer(URL url, Path target) throws IOExcep
}

// Always download to a temp-file to avoid partially downloaded files persisting a VM crash/shutdown
Files.createDirectories(target.getParent());
Path tempFile = Files.createTempFile(target.getParent(), target.getFileName().toString(), ".download");

try {
Expand Down

0 comments on commit a6a4475

Please sign in to comment.