1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

Fix MAS permission issues

This commit is contained in:
Reinhard Pointner 2016-01-31 18:16:18 +00:00
parent 5ffc2a804c
commit 62cc40136a
2 changed files with 10 additions and 10 deletions

View File

@ -53,11 +53,6 @@ class FileTreeTransferablePolicy extends BackgroundFileTransferablePolicy<TreeNo
@Override
protected void handleInBackground(List<File> 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);
}
@ -68,6 +63,11 @@ class FileTreeTransferablePolicy extends BackgroundFileTransferablePolicy<TreeNo
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(), ...
FastFile root = FastFile.create(filter(files, FOLDERS)).get(0);

View File

@ -52,11 +52,6 @@ class ChecksumTableTransferablePolicy extends BackgroundFileTransferablePolicy<C
@Override
protected void handleInBackground(List<File> files, TransferAction action) {
// make sure we have access to the parent folder structure, not just the dropped file
if (isMacSandbox()) {
MacAppUtilities.askUnlockFolders(getWindow(table), files);
}
if (files.size() == 1 && getHashType(files.get(0)) != null) {
model.setHashType(getHashType(files.get(0)));
}
@ -78,6 +73,11 @@ class ChecksumTableTransferablePolicy extends BackgroundFileTransferablePolicy<C
@Override
protected void load(List<File> files, TransferAction action) throws IOException {
// make sure we have access to the parent folder structure, not just the dropped file
if (isMacSandbox()) {
MacAppUtilities.askUnlockFolders(getWindow(table), files);
}
// initialize drop parameters
executor.set(computationService.newExecutor());
verificationTracker.set(new VerificationTracker(5));