diff --git a/src/main/java/omegaui/io/storage/FileUtils.java b/src/main/java/omegaui/io/storage/FileUtils.java index 216d647..2335386 100644 --- a/src/main/java/omegaui/io/storage/FileUtils.java +++ b/src/main/java/omegaui/io/storage/FileUtils.java @@ -70,7 +70,7 @@ public static String read(File file){ public static boolean write(File file, String content){ File parent = file.getParentFile(); if(parent != null) { - if(!parent.mkdirs()){ + if(!parent.exists() && !parent.mkdirs()){ System.err.println("Cannot construct the parent directories: " + file); return false; }