From 552f0e42b5dbcd754ff0245c717c2aaf44793af4 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 8 Jan 2024 11:19:05 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A6=AA=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=81=8C=E4=B8=8D=E8=B6=B3=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=AF=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/source/file/impl/FileManagerImpl.java | 10 +++++++++- 1 file changed, 9 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 928393fb..7912db6e 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 @@ -81,7 +81,15 @@ public class FileManagerImpl implements FileManager { public void createDir(String dirName) { //ディレクトリ作成 logger.debug("createDir", "called"); - currentDir.resolve(dirName).toFile().mkdir(); // TODO-rca: エラーハンドリング + + Path dir = currentDir.resolve(dirName); + if (!Files.exists(dir)) { + try { + Files.createDirectories(dir); + } catch (IOException e) { + e.printStackTrace(); + } + } } @Override