Squelching prior notified loop detection
This commit is contained in:
parent
9d0143b704
commit
87f2deed65
|
@ -29,11 +29,16 @@ import java.nio.file.attribute.BasicFileAttributes;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class PathFinder extends SimpleFileVisitor<Path>
|
||||
{
|
||||
// internal tracking of prior notified paths (to avoid repeated notification of same ignored path)
|
||||
private static Set<Path> NOTIFIED_PATHS = new HashSet<>();
|
||||
|
||||
private boolean includeDirsInResults = false;
|
||||
private Map<String, Path> hits = new HashMap<>();
|
||||
private Path basePath = null;
|
||||
|
@ -149,7 +154,11 @@ public class PathFinder extends SimpleFileVisitor<Path>
|
|||
{
|
||||
if (exc instanceof FileSystemLoopException)
|
||||
{
|
||||
StartLog.warn("skipping detected filesystem loop: " + file);
|
||||
if (!NOTIFIED_PATHS.contains(file))
|
||||
{
|
||||
StartLog.warn("skipping detected filesystem loop: " + file);
|
||||
NOTIFIED_PATHS.add(file);
|
||||
}
|
||||
return FileVisitResult.SKIP_SUBTREE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue