createDirectory実装 fix

This commit is contained in:
r-ca 2024-01-09 12:53:18 +09:00
parent a2eb04e96b
commit 0439a998e3
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -185,7 +185,11 @@ public class FileManagerImpl implements FileManager {
@Override @Override
public FileManager createDirectory() throws IOException { public FileManager createDirectory() throws IOException {
try { try {
Files.createDirectory(this.path); if (this.autoCreateParent) { // configとして管理する必要はないかも
Files.createDirectories(this.path);
} else {
Files.createDirectory(this.path);
}
} catch (Exception e) { } catch (Exception e) {
logger.error("createDirectory", e.getMessage()); logger.error("createDirectory", e.getMessage());
throw new IOException("Failed to create directory"); throw new IOException("Failed to create directory");