Skip to content

Commit

Permalink
Follow symlinks when looking for source files
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-gh committed Nov 24, 2019
1 parent 623bbcf commit 5f2a579
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/cadixdev/mercury/Mercury.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand Down Expand Up @@ -173,7 +174,7 @@ private void run() throws Exception {
parser.setEnvironment(toArray(this.classPath.stream()), sourcePath, getEncodings(sourcePath), true);

// Walk directory to find source files
String[] sourceFiles = toArray(Files.walk(this.sourceDir)
String[] sourceFiles = toArray(Files.walk(this.sourceDir, FileVisitOption.FOLLOW_LINKS)
.filter(p -> p.getFileName() != null && p.getFileName().toString().endsWith(JAVA_EXTENSION)));

for (SourceProcessor processor : this.processors) {
Expand Down

0 comments on commit 5f2a579

Please sign in to comment.