1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 08:48:51 -05:00

* make sure to ignore hidden folders (e.g. system folders)

This commit is contained in:
Reinhard Pointner 2014-09-19 15:06:48 +00:00
parent 0e8fb7235e
commit 8e0082e977

View File

@ -155,6 +155,10 @@ public class ScriptShellMethods {
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
File folder = dir.toFile(); File folder = dir.toFile();
if (folder.isHidden()) {
return FileVisitResult.SKIP_SUBTREE;
}
if (FileUtilities.filter(FileUtilities.getChildren(folder), VIDEO_FILES).size() > 0 || MediaDetection.isDiskFolder(folder)) { if (FileUtilities.filter(FileUtilities.getChildren(folder), VIDEO_FILES).size() > 0 || MediaDetection.isDiskFolder(folder)) {
mediaFolders.add(folder); mediaFolders.add(folder);
return FileVisitResult.SKIP_SUBTREE; return FileVisitResult.SKIP_SUBTREE;