JAL-3618 Enable appBundleIsTraversable in JFileChooser on macOS
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 5af94e4..1a4a44b 100755 (executable)
@@ -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"));