aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Kishore2014-03-26 04:17:10 (EDT)
committerArun Thondapu2014-03-27 06:59:10 (EDT)
commitacbdf58fdaac09943c13b07378d28feb8adc7a94 (patch)
tree0090466d8d7184ea6b65c653861907948503266f
parentfabe0caff75d3618e45dc7cbe6e1763a06adbc99 (diff)
downloadeclipse.platform.swt-acbdf58fdaac09943c13b07378d28feb8adc7a94.zip
eclipse.platform.swt-acbdf58fdaac09943c13b07378d28feb8adc7a94.tar.gz
eclipse.platform.swt-acbdf58fdaac09943c13b07378d28feb8adc7a94.tar.bz2
Bug 428216 - Wrong file path is returned by FileDialog(SWT.SAVE)refs/changes/07/23907/5
Change-Id: Ic3cc843d2943c44047522317c9000d69c8b813e5 Signed-off-by: Abhishek Kishore <abhishek.kishore@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java6
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 8277164..d6281e8 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));