Skip to content

Commit

Permalink
Merge pull request #37996 from geoand/#37903
Browse files Browse the repository at this point in the history
Don't fail if config is not a directory
  • Loading branch information
geoand authored Jan 3, 2024
2 parents 63c1180 + b364fe9 commit 2a07962
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 2a07962

Please sign in to comment.