# HG changeset patch # User Frank Benoit # Date 1215380191 -7200 # Node ID cfb304d22f28d4465dea9dea0e9e881f96474328 # Parent cfd5fa2ce475a9f7466049a71a3fdf96beec3a8f# Parent 5fe95b1ccf68c209e48229b2e7fe4d27c3b5749e merge diff -r cfd5fa2ce475 -r cfb304d22f28 jface/FileTreeViewer.d --- a/jface/FileTreeViewer.d Sun Jul 06 18:53:29 2008 +0200 +++ b/jface/FileTreeViewer.d Sun Jul 06 23:36:31 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; }