This commit is contained in:
r-ca 2024-01-09 15:11:15 +09:00
parent 27aa6a2f15
commit c05d45afdd
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -174,7 +174,9 @@ public class FileManagerImpl implements FileManager {
public FileManager createFile() throws IOException { public FileManager createFile() throws IOException {
try { try {
if (this.autoCreateParent) { if (this.autoCreateParent) {
Files.createDirectories(this.path.getParent()); if (!this.path.getParent().toFile().exists()) {
Files.createDirectories(this.path.getParent());
}
} }
Files.createFile(this.path); Files.createFile(this.path);
} catch (Exception e) { } catch (Exception e) {