Mercurial > projects > dwt-samples
changeset 111:5fe95b1ccf68
Fix: compile error for tango svn
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jul 2008 23:35:10 +0200 |
parents | be3a48f1d596 |
children | cfb304d22f28 |
files | jface/FileTreeViewer.d |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/jface/FileTreeViewer.d Sun Jul 06 14:21:59 2008 +0200 +++ b/jface/FileTreeViewer.d Sun Jul 06 23:35:10 2008 +0200 @@ -35,7 +35,12 @@ //import dwt.dwthelper.utils; //------------------------------------ +version(TANGOSVN){ +import tango.io.FileSystem; +} +else{ import tango.io.FileRoots; +} import tango.io.FilePath; import tango.util.log.Trace; @@ -128,6 +133,16 @@ public override Object[] getElements( Object arg0 ){ Object[] res; +version(TANGOSVN){ + foreach( root; FileSystem.roots()){ + // ignore floppy drives, they bring up strange error messages + if( root == `A:\`|| root == `B:\` ){ + continue; + } + res ~= new FilePath( root ); + } +} +else{ foreach( root; FileRoots.list()){ // ignore floppy drives, they bring up strange error messages if( root == `A:\`|| root == `B:\` ){ @@ -135,7 +150,7 @@ } res ~= new FilePath( root ); } - +} return res; }