Skip to content

Commit

Permalink
Check if directory exists, before creating it.
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Mar 22, 2014
1 parent 32a1b97 commit ab3c52a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fitnesse/responders/run/TestResponder.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ public static class HistoryWriterFactory implements TestXmlFormatter.WriterFacto
public Writer getWriter(FitNesseContext context, WikiPage page, TestSummary counts, long time) throws IOException {
File resultPath = new File(makePageHistoryFileName(context, page, counts, time));
File resultDirectory = new File(resultPath.getParent());
resultDirectory.mkdirs();
if (!resultDirectory.exists()) {
resultDirectory.mkdirs();
}
File resultFile = new File(resultDirectory, resultPath.getName());
return new PrintWriter(resultFile, "UTF-8");
}
Expand Down

0 comments on commit ab3c52a

Please sign in to comment.