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:
parent
0e8fb7235e
commit
8e0082e977
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user