Mercurial > projects > dwt-addons
diff dwtx/jface/preference/FileFieldEditor.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 | 46a6e0e6ccd4 |
children |
line wrap: on
line diff
--- a/dwtx/jface/preference/FileFieldEditor.d Sat Jul 26 14:39:08 2008 +0200 +++ b/dwtx/jface/preference/FileFieldEditor.d Fri Aug 01 07:06:52 2008 +0200 @@ -22,6 +22,7 @@ import dwt.dwthelper.utils; import tango.io.FilePath; +static import tango.io.Path; import tango.io.FileSystem; /** @@ -102,7 +103,7 @@ * Opens the file chooser dialog and returns the selected file. */ protected override String changePressed() { - auto f = new FilePath(getTextControl().getText()); + auto f = new FilePath(tango.io.Path.standard(getTextControl().getText())); if (!f.exists()) { f = cast(FilePath)null; } @@ -133,7 +134,7 @@ msg = getErrorMessage(); } } else { - auto file = new FilePath(path); + auto file = new FilePath(tango.io.Path.standard(path)); if (/+file.isFile()+/ file.exists && !file.isFolder ) { if (enforceAbsolute && !file.isAbsolute()) { msg = JFaceResources @@ -173,7 +174,7 @@ if (file !is null) { file = file.trim(); if (file.length > 0) { - return new FilePath(file); + return new FilePath(tango.io.Path.standard(file)); } }