Skip to content

Commit

Permalink
incubator-kie-kogito-runtimes#3438: check if resources folder path ex…
Browse files Browse the repository at this point in the history
…ists
  • Loading branch information
jstastny-cz authored and rgdoliveira committed Mar 27, 2024
1 parent 1fdf11a commit 98c8b7c
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,13 @@ private List<String> getSourceFiles(File[] resourcePaths) throws IOException {

for (File resourceFile : resourcePaths) {
Path resourcePath = resourceFile.toPath();
try (Stream<Path> walkedPaths = Files.walk(resourcePath)) {
walkedPaths.filter(this::isSourceFile)
.map(resourcePath::relativize)
.map(Path::toString)
.forEach(sourceFiles::add);
if (Files.exists(resourcePath)) {
try (Stream<Path> walkedPaths = Files.walk(resourcePath)) {
walkedPaths.filter(this::isSourceFile)
.map(resourcePath::relativize)
.map(Path::toString)
.forEach(sourceFiles::add);
}
}
}

Expand Down

0 comments on commit 98c8b7c

Please sign in to comment.