diff --git a/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java b/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java index aecb118c..0dccc6b8 100644 --- a/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java +++ b/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java @@ -70,7 +70,7 @@ class ChecksumTableTransferablePolicy extends BackgroundFileTransferablePolicy files, TransferAction action) throws IOException { // initialize drop parameters executor.set(computationService.newExecutor()); - verificationTracker.set(new VerificationTracker(3)); + verificationTracker.set(new VerificationTracker(5)); try { // handle single verification file drop @@ -79,7 +79,7 @@ class ChecksumTableTransferablePolicy extends BackgroundFileTransferablePolicy getChildren(File folder) { - File[] files = folder.listFiles(); - - // children array may be null if folder permissions do not allow listing of files - if (files == null) { - files = new File[0]; - } - - return asList(files); + return getChildren(folder, null, null); } public static List getChildren(File folder, FileFilter filter) { - File[] files = folder.listFiles(filter); + return getChildren(folder, filter, null); + } + + public static List getChildren(File folder, FileFilter filter, Comparator sorter) { + File[] files = filter == null ? folder.listFiles() : folder.listFiles(filter); // children array may be null if folder permissions do not allow listing of files if (files == null) { files = new File[0]; + } else if (sorter != null) { + sort(files, sorter); } return asList(files); @@ -695,6 +694,14 @@ public final class FileUtilities { } }; + public static final FileFilter NOT_HIDDEN = new FileFilter() { + + @Override + public boolean accept(File file) { + return !file.isHidden(); + } + }; + public static class ParentFilter implements FileFilter { private final File folder;