List files within /Volumes as media root (sandbox seems to give access to folder listings for that)

This commit is contained in:
Reinhard Pointner 2018-04-21 11:42:38 +07:00
parent 684402fe12
commit 34d779faab
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -105,7 +105,7 @@ public class DropToUnlock extends JList<File> {
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;