diff --git a/common/src/main/java/bisq/common/config/Config.java b/common/src/main/java/bisq/common/config/Config.java index dac6afe545c..2222ce03313 100644 --- a/common/src/main/java/bisq/common/config/Config.java +++ b/common/src/main/java/bisq/common/config/Config.java @@ -797,14 +797,13 @@ private static File tempUserDataDir() { * nothing if the directory already exists. * @return the given directory, now guaranteed to exist */ - private static File mkAppDataDir(File appDataDir) { - Path path = appDataDir.toPath(); + private static File mkAppDataDir(File dir) { try { - Files.createDirectories(path); + Files.createDirectories(dir.toPath()); } catch (IOException ex) { - throw new UncheckedIOException(format("Application data directory '%s' could not be created", path), ex); + throw new UncheckedIOException(format("Application data directory '%s' could not be created", dir), ex); } - return appDataDir; + return dir; } /** @@ -815,11 +814,10 @@ private static File mkAppDataDir(File appDataDir) { private static File mkdir(File parent, String child) { File dir = new File(parent, child); if (!dir.exists()) { - Path path = dir.toPath(); try { - Files.createDirectory(path); + Files.createDirectory(dir.toPath()); } catch (IOException ex) { - throw new UncheckedIOException(format("Directory '%s' could not be created", path), ex); + throw new UncheckedIOException(format("Directory '%s' could not be created", dir), ex); } } return dir;