Mercurial > projects > dwt-addons
comparison dwtx/jface/preference/PathEditor.d @ 97:0168c579a3f9
Fix path handling, thanks yidabu for reporting.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 01 Aug 2008 07:06:52 +0200 |
parents | 1088ca33d3e0 |
children |
comparison
equal
deleted
inserted
replaced
96:b492ba44e44d | 97:0168c579a3f9 |
---|---|
13 module dwtx.jface.preference.PathEditor; | 13 module dwtx.jface.preference.PathEditor; |
14 | 14 |
15 import dwtx.jface.preference.ListEditor; | 15 import dwtx.jface.preference.ListEditor; |
16 | 16 |
17 import tango.io.FilePath; | 17 import tango.io.FilePath; |
18 static import tango.io.Path; | |
18 import tango.io.model.IFile; | 19 import tango.io.model.IFile; |
19 | 20 |
20 // import java.util.ArrayList; | 21 // import java.util.ArrayList; |
21 // import java.util.StringTokenizer; | 22 // import java.util.StringTokenizer; |
22 | 23 |
87 DirectoryDialog dialog = new DirectoryDialog(getShell()); | 88 DirectoryDialog dialog = new DirectoryDialog(getShell()); |
88 if (dirChooserLabelText !is null) { | 89 if (dirChooserLabelText !is null) { |
89 dialog.setMessage(dirChooserLabelText); | 90 dialog.setMessage(dirChooserLabelText); |
90 } | 91 } |
91 if (lastPath !is null) { | 92 if (lastPath !is null) { |
92 if ((new FilePath(lastPath)).exists()) { | 93 if ((new FilePath(tango.io.Path.standard(lastPath))).exists()) { |
93 dialog.setFilterPath(lastPath); | 94 dialog.setFilterPath(lastPath); |
94 } | 95 } |
95 } | 96 } |
96 String dir = dialog.open(); | 97 String dir = dialog.open(); |
97 if (dir !is null) { | 98 if (dir !is null) { |