diff --git a/jdk/src/macosx/native/sun/awt/CFileDialog.m b/jdk/src/macosx/native/sun/awt/CFileDialog.m index be7cadc64fb..af92c77bed3 100644 --- a/jdk/src/macosx/native/sun/awt/CFileDialog.m +++ b/jdk/src/macosx/native/sun/awt/CFileDialog.m @@ -110,7 +110,7 @@ canChooseDirectories:(BOOL)inChooseDirectories 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]; }