* 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
1 changed files with 4 additions and 0 deletions

View File

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