Skip to content

Commit

Permalink
GH-85: Fix unexpected exception being raised if no sources are found …
Browse files Browse the repository at this point in the history
…due to a missing directory/archive
  • Loading branch information
ascopes committed Feb 4, 2024
1 parent a97e1fd commit ee236fe
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public Collection<ProtoFileListing> createProtoFileListings(
}

public Optional<ProtoFileListing> createProtoFileListing(Path path) throws IOException {
if (!Files.exists(path)) {
log.debug("Skipping lookup in path {} as it does not exist", path);
return Optional.empty();
}

if (Files.isRegularFile(path)) {
return protoArchiveExtractor.extractProtoFiles(path);
}
Expand Down

0 comments on commit ee236fe

Please sign in to comment.