Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2001-09-14 15:29:37 +0000
committerSilenio Quarti2001-09-14 15:29:37 +0000
commit72f73318c5711896c5365f8b95372300980c5b89 (patch)
tree5bd397ca177ed8973e3c463a16c5edd2877a73aa /bundles
parent30234ab787dd5cb6e440b3ccf802a686950209af (diff)
downloadeclipse.platform.swt-72f73318c5711896c5365f8b95372300980c5b89.tar.gz
eclipse.platform.swt-72f73318c5711896c5365f8b95372300980c5b89.tar.xz
eclipse.platform.swt-72f73318c5711896c5365f8b95372300980c5b89.zip
*** empty log message ***
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
index a55bc30ecb..c9c604a837 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/FileDialog.java
@@ -335,11 +335,10 @@ public String open () {
}
OS.XmStringFree (xmString4);
int length = filterPath.length ();
- if ((length != 0) && (filterPath.charAt (length - 1) == '/')) {
+ if (length != 0 && filterPath.charAt (length - 1) == '/') {
filterPath = filterPath.substring (0, length - 1);
- int index = fullPath.length () - 1;
- while ((index >= 0) && (fullPath.charAt (index) != '/')) --index;
- fileName = fullPath.substring (index, fullPath.length ());
+ int index = fullPath.lastIndexOf ('/');
+ fileName = fullPath.substring (index + 1, fullPath.length ());
}
}

Back to the top