[Mono-bugs] [Bug 77007][Nor] New - Path.GetFullPath don't treats
"drive:path" as CurrentDirectory
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Dec 15 12:17:55 EST 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kornelpal at hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77007
--- shadow/77007 2005-12-15 12:17:55.000000000 -0500
+++ shadow/77007.tmp.23152 2005-12-15 12:17:55.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 77007
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: kornelpal at hotmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Summary: Path.GetFullPath don't treats "drive:path" as CurrentDirectory
+
+Sebastien, I really appreciate the work you have done on reworking large
+parts of path handlig. But your fix of Bug 76191 is only good for
+DirectoryInfo.Parent as Path.GetFullPath only treats "drive:" specially
+but ignores or mistreats "drive:path".
+
+And you are right that there is only one current directory. I was
+thinking of cmd.exe that maintains current directory on each drive but it
+isn't an operating system feature.
+
+Test case:
+using System;
+using System.IO;
+
+class PathGetFullPath
+{
+static void Main(string[] args)
+{
+Environment.CurrentDirectory = @"C:\WINDOWS\system32";
+Console.WriteLine(Path.GetFullPath(@"C:"));
+Console.WriteLine(Path.GetFullPath(@"C:dir"));
+Console.WriteLine(Path.GetFullPath(@"C:..\dir"));
+Console.WriteLine(Path.GetFullPath(@"C:..\..\dir"));
+}
+}
+
+Actual results:
+C:\WINDOWS\system32
+C:dir
+C:..\dir
+dir
+
+Expected results:
+C:\WINDOWS\system32
+C:\WINDOWS\system32\dir
+C:\WINDOWS\dir
+C:\dir
More information about the mono-bugs
mailing list