# HG changeset patch # User Frank Benoit # Date 1217567212 -7200 # Node ID 0168c579a3f9a4bc493cb57e3437dbb28dac7d1f # Parent b492ba44e44dcc1ad1486bba389484752f8f82b3 Fix path handling, thanks yidabu for reporting. diff -r b492ba44e44d -r 0168c579a3f9 dwtx/core/runtime/Path.d --- a/dwtx/core/runtime/Path.d Sat Jul 26 14:39:08 2008 +0200 +++ b/dwtx/core/runtime/Path.d Fri Aug 01 07:06:52 2008 +0200 @@ -13,6 +13,7 @@ module dwtx.core.runtime.Path; import tango.io.FilePath; +static import tango.io.Path; import dwtx.core.runtime.IPath; import dwtx.core.runtime.Assert; @@ -885,7 +886,7 @@ * @see IPath#toFile() */ public FilePath toFile() { - return new FilePath(toOSString()); + return new FilePath(tango.io.Path.standard(toOSString())); } /* (Intentionally not included in javadoc) diff -r b492ba44e44d -r 0168c579a3f9 dwtx/jface/preference/DirectoryFieldEditor.d --- a/dwtx/jface/preference/DirectoryFieldEditor.d Sat Jul 26 14:39:08 2008 +0200 +++ b/dwtx/jface/preference/DirectoryFieldEditor.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; /** @@ -56,7 +57,7 @@ * Opens the directory chooser dialog and returns the selected directory. */ 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; } @@ -78,7 +79,7 @@ if (fileName.length is 0 && isEmptyStringAllowed()) { return true; } - auto file = new FilePath(fileName); + auto file = new FilePath(tango.io.Path.standard(fileName)); return file.exists() && file.isFolder(); } @@ -98,7 +99,7 @@ if (dir !is null) { dir = dir.trim(); if (dir.length > 0) { - return new FilePath(dir); + return new FilePath(tango.io.Path.standard(dir)); } } diff -r b492ba44e44d -r 0168c579a3f9 dwtx/jface/preference/FileFieldEditor.d --- 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)); } } diff -r b492ba44e44d -r 0168c579a3f9 dwtx/jface/preference/PathEditor.d --- a/dwtx/jface/preference/PathEditor.d Sat Jul 26 14:39:08 2008 +0200 +++ b/dwtx/jface/preference/PathEditor.d Fri Aug 01 07:06:52 2008 +0200 @@ -15,6 +15,7 @@ import dwtx.jface.preference.ListEditor; import tango.io.FilePath; +static import tango.io.Path; import tango.io.model.IFile; // import java.util.ArrayList; @@ -89,7 +90,7 @@ dialog.setMessage(dirChooserLabelText); } if (lastPath !is null) { - if ((new FilePath(lastPath)).exists()) { + if ((new FilePath(tango.io.Path.standard(lastPath))).exists()) { dialog.setFilterPath(lastPath); } }