Skip to content

Commit

Permalink
createTempDirectory atomically
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaroslav Tulach committed Dec 15, 2020
1 parent d1dcd9c commit fa70e50
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ static URL extract(URL url) throws IOException {
if (jar == null) {
return url;
}
File dir = File.createTempFile(jar.getName(), ".dir");
dir.delete();
dir.mkdirs();
File dir = Files.createTempDirectory(jar.getName() + ".dir").toFile();

Enumeration<JarEntry> en = jar.entries();
while (en.hasMoreElements()) {
Expand Down

0 comments on commit fa70e50

Please sign in to comment.