Skip to content

Commit

Permalink
Added Runtime exception on failing directory creation
Browse files Browse the repository at this point in the history
(cherry picked from commit dd8ae2c)
  • Loading branch information
KERN Christian authored and gsmet committed Sep 10, 2024
1 parent e557f13 commit 2bb7dba
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ public void reset(Context context) {
throw new RuntimeException("Cannot reset file manager", e);
}
}

private void ensureDirectories(Iterable<File> directories){
for (File processorPath : directories) {
if (!processorPath.exists()) {
processorPath.mkdirs();

private void ensureDirectories(Iterable<File> directories) {
for (File directory : directories) {
if (!directory.exists()) {
final boolean success = directory.mkdirs();
if (!success) {
throw new RuntimeException("Cannot create directory " + directory);
}
}
}
}
Expand Down

0 comments on commit 2bb7dba

Please sign in to comment.