Skip to content

Commit e5768a8

Browse files
authored
Improved FileUtils.java
1 parent 61a7352 commit e5768a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/omegaui/io/storage/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static String read(File file){
6969
*/
7070
public static boolean write(File file, String content){
7171
File parent = file.getParentFile();
72-
if(parent != null) {
72+
if(parent != null && !parent.exists()) {
7373
if(!parent.mkdirs()){
7474
System.err.println("Cannot construct the parent directories: " + file);
7575
return false;

0 commit comments

Comments
 (0)