Skip to content

Commit

Permalink
# bug with existent generator-src directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Frisch12 committed Mar 19, 2018
1 parent 1b161c3 commit f9aacbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/de/seelab/codegenerator/ProjectContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void writeOutputFile(String namespace, String filename, String content) t

public void writeOutputFile(String namespace, String filename, byte[] content) throws Exception {
File file = new File(new File(outputDir.getAbsolutePath(), namespace.replace(".", "/")).getAbsoluteFile(), filename);
boolean mkdirs = file.getParentFile().mkdirs();
boolean mkdirs = file.getParentFile().exists() || file.getParentFile().mkdirs();
if(!mkdirs) throw new IOException("Cannot create directory " + file.getParent());
FileUtils.writeByteArrayToFile(file, content);
}
Expand Down

0 comments on commit f9aacbc

Please sign in to comment.