Skip to content

Commit

Permalink
Don't fail if config is not a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jan 3, 2024
1 parent 30c3267 commit b364fe9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.net.URI;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.NotDirectoryException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
Expand Down Expand Up @@ -186,6 +187,9 @@ public static Set<String> configFiles(Path configFilesLocation) throws IOExcepti
for (Path candidate : candidates) {
configFiles.add(candidate.toUri().toURL().toString());
}
} catch (NotDirectoryException ignored) {
log.debugf("File %s is not a directory", configFilesLocation.toAbsolutePath());
return Collections.emptySet();
}
return configFiles;
}
Expand Down

0 comments on commit b364fe9

Please sign in to comment.