src/macosx/native/sun/awt/CFileDialog.m

Print this page

        

@@ -108,11 +108,11 @@
         }
 
         if (fMode == java_awt_FileDialog_LOAD) {
             NSOpenPanel *openPanel = (NSOpenPanel *)thePanel;
             [openPanel setAllowsMultipleSelection:fMultipleMode];
-            [openPanel setCanChooseFiles:YES];
+            [openPanel setCanChooseFiles:!fChooseDirectories];
             [openPanel setCanChooseDirectories:fChooseDirectories];
             [openPanel setCanCreateDirectories:YES];
         }
 
         [thePanel setDelegate:self];