Skip to content

Commit

Permalink
follow links
Browse files Browse the repository at this point in the history
  • Loading branch information
poison committed Sep 29, 2018
1 parent 8c6ee84 commit 9df96c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.io.IOException;
import java.nio.file.FileVisitOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
Expand Down Expand Up @@ -84,7 +85,7 @@ public static FsScanner scan(Path targetPath, Set<Path> baseDirectories) {

private static ImmutableSet<Path> scan(final Path baseDirectory, final AtomicInteger visited) {
try {
final ImmutableSet<Path> paths=Files.walk(baseDirectory)
final ImmutableSet<Path> paths=Files.walk(baseDirectory, FileVisitOption.FOLLOW_LINKS)
.map(Path::toAbsolutePath)
.peek(p -> visited.incrementAndGet())
.filter(p -> null!=p.getParent())
Expand Down

0 comments on commit 9df96c9

Please sign in to comment.