[Mono-bugs] [Bug 616315] New: System.IO.Path.GetFullPath() doesn't support MONO_IOMAP

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 22 09:52:36 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=616315

http://bugzilla.novell.com/show_bug.cgi?id=616315#c0


           Summary: System.IO.Path.GetFullPath() doesn't support
                    MONO_IOMAP
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: x86-64
        OS/Version: openSUSE 11.2
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Path.GetFullPath() generates "invalid"/"garbage" filenames when handed DOS
paths and MONO_IOMAP is set.

This is also present in trunk r158590.

Consider the following program:


    using System;
    using System.IO;

    class Test {
        static void Main ()
        {
            foreach (var e in Directory.GetFiles (@"T:\etc")) {
                Console.WriteLine ("{0}\t{1}",
                        e, 
                        Path.GetFullPath (e));
            }
        }
    }

Compile, run:

    $ gmcs drive.cs
    $ mono drive.exe
    Unhandled Exception: System.IO.DirectoryNotFoundException: Directory
'T:\etc' not found.

Run with MONO_IOMAP=drive set, and it should list the contents of /etc. 
However, notice that the 2nd filename on each line (the output of
Path.GetFullPath()) does NOT map to /etc, but instead to a non-existent path
within the current directory (/home/jon/tmp being the current directory):

    $ MONO_IOMAP=drive mono drive.exe
    T:\etc/.pwd.lock    /home/jon/tmp/T:\etc/.pwd.lock
    T:\etc/DIR_COLORS    /home/jon/tmp/T:\etc/DIR_COLORS
    T:\etc/HOSTNAME        /home/jon/tmp/T:\etc/HOSTNAME
    ...

This is problematic with e.g. xbuild running a .csproj which contains
references to drive names (e.g. referencing T:\libs\foo.dll), as xbuild uses
Path.GetFullPath().  The result is that MONO_IOMAP is ~useless in this context.

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


More information about the mono-bugs mailing list