From 0439a998e38094e434690c5a3723085c034aaa50 Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 12:53:18 +0900 Subject: [PATCH] =?UTF-8?q?createDirectory=E5=AE=9F=E8=A3=85=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/file/impl/FileManagerImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index fc0d828e..af0d4a25 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -185,7 +185,11 @@ public class FileManagerImpl implements FileManager { @Override public FileManager createDirectory() throws IOException { try { - Files.createDirectory(this.path); + if (this.autoCreateParent) { // configとして管理する必要はないかも? + Files.createDirectories(this.path); + } else { + Files.createDirectory(this.path); + } } catch (Exception e) { logger.error("createDirectory", e.getMessage()); throw new IOException("Failed to create directory");