From 4debb73ffcd3dfb80789c3f5495a0dffec125ebe Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 3 Feb 2016 18:25:05 +0000 Subject: [PATCH] Fix Mac sandbox issues --- source/net/filebot/ui/subtitle/SubtitleDropTarget.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java index daebe2f2..c8fa1fb5 100644 --- a/source/net/filebot/ui/subtitle/SubtitleDropTarget.java +++ b/source/net/filebot/ui/subtitle/SubtitleDropTarget.java @@ -1,6 +1,7 @@ package net.filebot.ui.subtitle; import static net.filebot.MediaTypes.*; +import static net.filebot.Settings.*; import static net.filebot.UserFiles.*; import static net.filebot.media.MediaDetection.*; import static net.filebot.ui.NotificationLogging.*; @@ -34,6 +35,7 @@ import javax.swing.JDialog; import net.filebot.ResourceManager; import net.filebot.Settings; +import net.filebot.mac.MacAppUtilities; import net.filebot.util.FileUtilities; import net.filebot.util.FileUtilities.ParentFilter; import net.filebot.web.OpenSubtitlesClient; @@ -241,6 +243,11 @@ abstract class SubtitleDropTarget extends JButton { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + // make sure we have access to the parent folder structure, not just the dropped file + if (isMacSandbox()) { + MacAppUtilities.askUnlockFolders(getWindow(this), input); + } + // perform a drop action depending on the given files final Collection files = new TreeSet();