changeset 341:f403c83322c3 default tip

fix: thx torhu
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 20:58:32 +0100
parents 8a2a24a30ea9
children
files dwt/dwthelper/File.d
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/dwthelper/File.d	Sun Nov 08 12:26:44 2009 +0100
+++ b/dwt/dwthelper/File.d	Sun Nov 08 20:58:32 2009 +0100
@@ -8,7 +8,11 @@
 static import tango.io.model.IFile;
 static import tango.io.FilePath;
 static import tango.io.Path;
-static import tango.io.FileSystem;
+version (TANGOSVN) {
+    static import tango.sys.Environment;
+} else {
+    static import tango.io.FileSystem;
+}
 
 public class File {
 
@@ -69,7 +73,12 @@
     }
 
     public String getAbsolutePath(){
-        return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath ).toString;
+        version (TANGOSVN) {
+            if ( mFilePath.isAbsolute ) return mFilePath.toString;
+            else return mFilePath.absolute( tango.sys.Environment.Environment.cwd ).toString;
+        } else {
+            return tango.io.FileSystem.FileSystem.toAbsolute( mFilePath).toString;
+        }
     }
 
     public dwt.dwthelper.File.File getAbsoluteFile(){