changeset 364:2bcb17ebe0be default tip

fix: thx torhu
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 20:57:46 +0100
parents 5f6d9bb33a53
children
files dwt/dwthelper/File.d
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/dwthelper/File.d	Sat Apr 04 21:38:37 2009 +0200
+++ b/dwt/dwthelper/File.d	Sun Nov 08 20:57:46 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(){