From c05d45afdddd73f5f8ff67ec43939486aea37f01 Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 9 Jan 2024 15:11:15 +0900 Subject: [PATCH] fix --- .../one/nem/lacerta/source/file/impl/FileManagerImpl.java | 4 +++- 1 file changed, 3 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 ed011f9c..109f9d8a 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 @@ -174,7 +174,9 @@ public class FileManagerImpl implements FileManager { public FileManager createFile() throws IOException { try { if (this.autoCreateParent) { - Files.createDirectories(this.path.getParent()); + if (!this.path.getParent().toFile().exists()) { + Files.createDirectories(this.path.getParent()); + } } Files.createFile(this.path); } catch (Exception e) {