Title: Message
Ah, that would explain it.
 
Shall I continue with the bug submission?
-----Original Message-----
From: Nick Berardi [mailto:[EMAIL PROTECTED]
Sent: 03 March 2004 14:55
To: COOPER, Jonathan -Syntegra UK; [EMAIL PROTECTED]
Subject: RE: [Mono-list] Simple code - differences in output between mono & .Net

I was right here is your problem:

 

 
                [MonoTODO("Implement on windows, for real")]
                public static string[] GetLogicalDrives ()
                { 
                        //FIXME: Hardcoded Paths
                        if ((int)Environment.OSVersion.Platform == 128)
                                return new string[] { "/" };
                        else
                                return new string [] { "A:\\", "C:\\" };
                }

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 9:32 AM
To: [EMAIL PROTECTED]
Subject: [Mono-list] Simple code - differences in output between mono & .Net

 

I have code (at the end of this message) in a .cs file, compiled with mcs and csc on Windows XP. When compiled with either compiler the executable works on both runtimes (.Net and mono). However, the output is different.

Run under .Net:
------------------------
Disk:  A:\
Disk:  C:\
Disk:  D:\
Disk:  K:\
Disk:  L:\
Disk:  Q:\
Disk:  T:\
Disk:  U:\
Disk:  X:\
c:\
Dir:  c:\Compaq
Dir:  c:\Config.Msi
Dir:  c:\Documents and Settings
Dir:  c:\Program Files
Dir:  c:\RECYCLER
Dir:  c:\System Volume Information
Dir:  c:\WINNT

 

Basically the contents of the root c:\ drive

Run under mono:
--------------------------
Disk:  A:\
Disk:  C:\
c:\
>> a list of directories in the current directory rather than the root c:\ <<

Is this due to an incomplete feature, or am I missing something?

Thanks in advance,
Jon Cooper

 

------------------------ CODE in drives.cs ------------------------

using System;
using System.IO;

namespace test
{
   class test
   {
      [STAThread]
      static void Main(string[] args)
      {
         string[] s = Directory.GetLogicalDrives();
         foreach(string drive in s)
            Console.WriteLine("Disk:  {0}",drive);

         string mydrive = Console.ReadLine();

         if(mydrive.Length != 0)
         {
           foreach(string d in Directory.GetDirectories(mydrive))
              Console.WriteLine("Dir:  {0}",d);

           Console.Read();  //pause
         }
      }
   }
}



********************************************************************

This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************



********************************************************************

This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to