8025503: [macosx] FileDialog allows file selection with apple.awt.fileDialogForDirectories = true

Reviewed-by: serb, anthony
This commit is contained in:
Petr Pchelko 2013-09-27 17:04:16 +04:00
parent c49c083729
commit 9d67cb2e94

View File

@ -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];
}