[Mono-bugs] [Bug 637078] New: DriveInfo.GetDrives() returns paths with escaped octal characters in them

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 3 15:26:01 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=637078

https://bugzilla.novell.com/show_bug.cgi?id=637078#c0


           Summary: DriveInfo.GetDrives() returns paths with escaped octal
                    characters in them
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: gonzalo at novell.com
        ReportedBy: gonzalo at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


1. Mount any disk in a path that contains a space:
  # mount /dev/sda4 /mnt/some\ path

2. Compile and run:
-----------------
using System;
using System.IO;

namespace gtktutorial1
{
        class MainClass
        {
                public static void Main (string[] args)
                {
                        DriveInfo[] infos = DriveInfo.GetDrives();
                        foreach (DriveInfo info in infos) {
                Console.WriteLine (info.RootDirectory.FullName);
                Console.WriteLine (info.TotalSize);
                        }
                }
        }
}
---------------------

Actual results:
..
/mnt/other\040mount

Unhandled Exception: System.IO.FileNotFoundException: Could not find file
"/mnt/other\040mount"
File name: '/mnt/other\040mount'
  at System.IO.DriveInfo.GetDiskFreeSpace (System.String path, System.UInt64&
availableFreeSpace, System.UInt64& totalSize, System.UInt64& totalFreeSpace)
[0x00000] in <filename unknown>:0 
  at System.IO.DriveInfo.get_TotalSize () [0x00000] in <filename unknown>:0 
  at gtktutorial1.MainClass.Main (System.String[] args) [0x00000] in <filename
unknown>:0

Expected results:
File found and total size displayed.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list