diff --git a/source/net/filebot/ui/analyze/FileTreeTransferablePolicy.java b/source/net/filebot/ui/analyze/FileTreeTransferablePolicy.java index cd4647ac..149ff6c4 100644 --- a/source/net/filebot/ui/analyze/FileTreeTransferablePolicy.java +++ b/source/net/filebot/ui/analyze/FileTreeTransferablePolicy.java @@ -51,16 +51,21 @@ class FileTreeTransferablePolicy extends BackgroundFileTransferablePolicy files, TransferAction action) { + // make sure we have access to the parent folder structure, not just the dropped file + if (isMacSandbox()) { + MacAppUtilities.askUnlockFolders(getWindow(tree), files); + } + + super.handleInBackground(files, action); + } + @Override protected void load(List files, TransferAction action) { try { if (files.size() > 1 || containsOnly(files, FILES)) { files = Arrays.asList(files.get(0).getParentFile()); - - // make sure we have access to the parent folder structure, not just the dropped file - if (isMacSandbox()) { - MacAppUtilities.askUnlockFolders(getWindow(tree), files); - } } // use fast file to minimize system calls like length(), isDirectory(), isFile(), ... diff --git a/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java b/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java index 0dccc6b8..5a3ca6a2 100644 --- a/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java +++ b/source/net/filebot/ui/sfv/ChecksumTableTransferablePolicy.java @@ -3,9 +3,11 @@ package net.filebot.ui.sfv; import static java.util.Arrays.*; import static java.util.Collections.*; import static net.filebot.MediaTypes.*; +import static net.filebot.Settings.*; import static net.filebot.hash.VerificationUtilities.*; import static net.filebot.ui.NotificationLogging.*; import static net.filebot.util.FileUtilities.*; +import static net.filebot.util.ui.SwingUI.*; import java.io.File; import java.io.IOException; @@ -19,6 +21,7 @@ import java.util.logging.Level; import net.filebot.MediaTypes; import net.filebot.hash.HashType; import net.filebot.hash.VerificationFileReader; +import net.filebot.mac.MacAppUtilities; import net.filebot.ui.transfer.BackgroundFileTransferablePolicy; import net.filebot.util.ExceptionUtilities; @@ -47,6 +50,11 @@ class ChecksumTableTransferablePolicy extends BackgroundFileTransferablePolicy files, TransferAction action) { + // make sure we have access to the parent folder structure, not just the dropped file + if (isMacSandbox()) { + MacAppUtilities.askUnlockFolders(getWindow(files), files); + } + if (files.size() == 1 && getHashType(files.get(0)) != null) { model.setHashType(getHashType(files.get(0))); }