From f348fd3a680584559403e544310ad249491a086e Mon Sep 17 00:00:00 2001 From: "Antonio.Busuladzich" Date: Sun, 24 Nov 2024 09:18:41 +0200 Subject: [PATCH] use different util to create the tmp dir and formatting --- core/src/main/java/hudson/Util.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index fdcced538ef3..bfe00cf142ab 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -438,10 +438,10 @@ public static File createTempDir() throws IOException { final String tempDirNamePrefix = "jenkins"; final Path systemTmpDirectoryPath = Path.of(System.getProperty("java.io.tmpdir")); - if (!systemTmpDirectoryPath.toFile().exists()){ + if (!systemTmpDirectoryPath.toFile().exists()) { // In some cases the tmp directory set in the java.io.tmpdir property will not exist and hence will have to // be created here. - systemTmpDirectoryPath.toFile().mkdirs(); + Files.createDirectory(systemTmpDirectoryPath); } if (FileSystems.getDefault().supportedFileAttributeViews().contains("posix")) {