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
Fixes: quarkusio#37903
(cherry picked from commit b364fe9)
  • Loading branch information
geoand authored and gsmet committed Jan 9, 2024
1 parent 6d2b36e commit 9c042cf
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 9c042cf

Please sign in to comment.