diff options
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java index 827716442c..d6281e80cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java @@ -376,8 +376,10 @@ void setAllowedFileType (String fileType) { panel.setAllowedFileTypes(null); return; } - if (fileType.startsWith ("*.")) { - fileType = fileType.substring (2); + if (fileType.startsWith("*.")) { + fileType = fileType.substring(2); + } else if (fileType.startsWith(".")) { + fileType = fileType.substring(1); } NSMutableArray allowedFileTypes = NSMutableArray.arrayWithCapacity(1); allowedFileTypes.addObject(NSString.stringWith(fileType)); |