Commit 91ce19bf authored by Klaus Wölfel's avatar Klaus Wölfel

Do not skib directories of last_path files

parent 2463a54a
......@@ -118,12 +118,12 @@ public class FilenameFileInputPlugin
{
if (path.equals(directory)) {
return FileVisitResult.CONTINUE;
} else if (lastPath != null && path.toString().compareTo(lastPath) <= 0) {
} else if (lastPath != null && path.toString().compareTo(lastPath.substring(0, path.toString().length())) < 0) {
return FileVisitResult.SKIP_SUBTREE;
} else if (path.getFileName().toString().startsWith(".")) {
return FileVisitResult.SKIP_SUBTREE;
} else {
// Skip hidden
if (!path.getFileName().toString().startsWith(".") &&
path.getFileName().toString().startsWith(fileNamePrefix)) {
if (path.getFileName().toString().startsWith(fileNamePrefix)) {
return FileVisitResult.CONTINUE;
} else {
return FileVisitResult.SKIP_SUBTREE;
......@@ -131,21 +131,21 @@ public class FilenameFileInputPlugin
}
}
@Override
public FileVisitResult visitFile(Path path, BasicFileAttributes attrs)
{
if (lastPath != null && path.toString().compareTo(lastPath) <= 0) {
return FileVisitResult.CONTINUE;
} else if (path.getFileName().toString().startsWith(".")) {
return FileVisitResult.CONTINUE;
} else {
// Skip hidden
if (!path.getFileName().toString().startsWith(".") &&
path.getFileName().toString().startsWith(fileNamePrefix)) {
if (path.getFileName().toString().startsWith(fileNamePrefix)) {
builder.add(path.toString());
return FileVisitResult.CONTINUE;
}
}
return FileVisitResult.CONTINUE;
}
}
}
});
} catch (IOException ex) {
throw new RuntimeException(String.format("Failed get a list of local files at '%s'", directory), ex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment