From 34d779faabd6a78da978bca646aac4d1a31d92cc Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 21 Apr 2018 11:42:38 +0700 Subject: [PATCH] List files within /Volumes as media root (sandbox seems to give access to folder listings for that) --- source/net/filebot/media/ReleaseInfo.java | 2 +- source/net/filebot/platform/mac/DropToUnlock.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/media/ReleaseInfo.java b/source/net/filebot/media/ReleaseInfo.java index 43df71c5..0a8a773d 100644 --- a/source/net/filebot/media/ReleaseInfo.java +++ b/source/net/filebot/media/ReleaseInfo.java @@ -226,7 +226,7 @@ public class ReleaseInfo { if (isMacSandbox()) { // Mac for (File mediaRoot : getMediaRoots()) { - volumes.addAll(getChildren(mediaRoot, FOLDERS)); + // volumes.addAll(getChildren(mediaRoot, FOLDERS)); volumes.add(mediaRoot); } diff --git a/source/net/filebot/platform/mac/DropToUnlock.java b/source/net/filebot/platform/mac/DropToUnlock.java index ec2d2ab2..5c8e5748 100644 --- a/source/net/filebot/platform/mac/DropToUnlock.java +++ b/source/net/filebot/platform/mac/DropToUnlock.java @@ -105,7 +105,7 @@ public class DropToUnlock extends JList { File root = MediaDetection.getStructureRoot(file); // if structure root doesn't work just grab first existing parent folder - if (root == null || root.getParentFile() == null || root.getName().isEmpty()) { + if (root == null || root.getName().isEmpty() || root.getParentFile() == null || root.getParentFile().getName().isEmpty()) { for (File it : listPathTail(file, Integer.MAX_VALUE, true)) { if (it.isDirectory()) { return it;