Title: Message

Maybe NTFS defines partitions differently?  Or maybe for some reason Mono is hard coded to see the two common drives on every windows box.  It definitely is weird though.  I would submit it as a bug.

 


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

 

the strange thing is, D:\ is a partition on the same disk as C:\, and Q:\ is the CDROM....

-----Original Message-----
From: Nick Berardi [mailto:[EMAIL PROTECTED]]
Sent: 03 March 2004 14:41
To: COOPER, Jonathan -Syntegra UK
Subject: RE: [Mono-list] Simple code - differences in output between mono & .Net

It looks like mono doesn’t look for non-network drives.  That is a little weird.  The mono one should out put the same data as the .Net one so it is probably a bug in Mono

 


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