Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Nov 10, 2023
1 parent 23581aa commit 7053734
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public boolean writeResultToFile(String fileName, String directory, AsyncResult

try {
LOG.info("Writing query {} to file: {}", result.id, filePath);
Files.createDirectory(dirPath);
if (!Files.exists(dirPath)) {
Files.createDirectory(dirPath);
}
result.stream.open();
return Files.copy(result.stream, filePath) > 0;
} catch (IOException e) {
Expand Down

0 comments on commit 7053734

Please sign in to comment.