From 47c0eab957537d2ea08de93b80c3b5f834ca5962 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 5 Mar 2021 11:24:16 +0000 Subject: [PATCH] JAL-3618 Enable appBundleIsTraversable in JFileChooser on macOS --- src/jalview/jbgui/GPreferences.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 5af94e4..1a4a44b 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -1799,6 +1799,14 @@ public class GPreferences extends JPanel String choice = null; JFileChooser chooser = new JFileChooser(); + // Enable appBundleIsTraversable in macOS FileChooser to allow selecting + // hidden executables within .app dirs + if (Platform.isMac()) + { + chooser.putClientProperty("JFileChooser.appBundleIsTraversable", + true); + } + // chooser.setFileView(new JalviewFileView()); chooser.setDialogTitle( MessageManager.getString("label.open_local_file")); -- 1.7.10.2