changeset 8213:ad7db846c951

8025503: [macosx] FileDialog allows file selection with apple.awt.fileDialogForDirectories = true Reviewed-by: serb, anthony
author pchelko
date Fri, 27 Sep 2013 17:04:16 +0400
parents ca45169cb4eb
children 260bc59ca253
files src/macosx/native/sun/awt/CFileDialog.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/awt/CFileDialog.m	Fri Sep 27 14:29:27 2013 +0400
+++ b/src/macosx/native/sun/awt/CFileDialog.m	Fri Sep 27 17:04:16 2013 +0400
@@ -110,7 +110,7 @@
         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];
         }