Skip to content

Commit

Permalink
create missing output directory (refs #76)
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechhabarta committed Aug 11, 2016
1 parent 8f93b3e commit 3e7065e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public boolean shouldCloseWriter() {

public static Output to(File file) {
try {
file.getParentFile().mkdirs();
return new Output(new OutputStreamWriter(new FileOutputStream(file), Charset.forName("UTF-8")), file.toString(), true);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 3e7065e

Please sign in to comment.