[Mono-bugs] [Bug 42303][Nor] Changed - Path.GetFullPath () does not handle '.' and '..'

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 6 May 2003 09:34:21 -0400 (EDT)


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 gfr@skynet.be.

http://bugzilla.ximian.com/show_bug.cgi?id=42303

--- shadow/42303	Tue May  6 08:15:29 2003
+++ shadow/42303.tmp.10070	Tue May  6 09:34:21 2003
@@ -396,6 +396,92 @@
 checked in.
 
 We also have to figure out what System.IO functions should be 
 expanding paths like GetFullPath. Do you think you could take a look 
 at the functions that modify a string and see what they do under 
 Microsoft?
+
+------- Additional Comments From gfr@skynet.be  2003-05-06 09:34 -------
+Hello Ben,
+
+I've execute a little code to find the way how MS handle the
+unc path. The Function has the following code
+
+	public static void Test2 ()
+	{
+		System.Int32 i;
+		
+		i = 0;
+		System.Console.Out.WriteLine ("{0} ==> ", 
+@"\\matrix\share\upgrade\Latitude C600 - drivers XP");
+		foreach (System.String dirname in 
+System.IO.Directory.GetDirectories 
+(@"\\matrix\share\upgrade\Latitude C600 - drivers XP"))
+		{
+			System.Console.Out.WriteLine (" {0,-4} - 
+{1}", i++, dirname);
+		}
+		System.Console.Out.WriteLine ();
+
+		i = 0;
+		System.Console.Out.WriteLine ("{0} ==> ", 
+@"//matrix/share/upgrade/Latitude C600 - drivers XP");
+		foreach (System.String dirname in 
+System.IO.Directory.GetDirectories 
+(@"//matrix/share/upgrade/Latitude C600 - drivers XP"))
+		{
+			System.Console.Out.WriteLine (" {0,-4} - 
+{1}", i++, dirname);
+		}
+		System.Console.Out.WriteLine ();
+
+		System.Console.Out.WriteLine ("GetFullPath for {0} 
+is {1}", @"\\matrix\share\doc", Path.GetFullPath 
+(@"\\matrix\share\doc"));
+		System.Console.Out.WriteLine ("GetFullPath for {0} 
+is {1}", @"//matrix/share/doc", Path.GetFullPath 
+(@"//matrix/share/doc"));
+	}
+
+
+The result is:
+--------------
+\\matrix\share\upgrade\Latitude C600 - drivers XP ==>
+ 0    - \\matrix\share\upgrade\Latitude C600 - drivers XP\Video card
+ 1    - \\matrix\share\upgrade\Latitude C600 - drivers XP\Dell 
+upgrade preparation tools
+ 2    - \\matrix\share\upgrade\Latitude C600 - drivers XP\Dell 32 
+Bit Diagnostics
+ 3    - \\matrix\share\upgrade\Latitude C600 - drivers XP\ESS 
+Maestro 3i
+ 4    - \\matrix\share\upgrade\Latitude C600 - drivers XP\3COM 10-
+100 Ethernet Network adaptater
+ 5    - \\matrix\share\upgrade\Latitude C600 - drivers XP\3COM 10-
+100 & V.90 LAN Mini-PCI driver
+
+//matrix/share/upgrade/Latitude C600 - drivers XP ==>
+ 0    - //matrix/share/upgrade/Latitude C600 - drivers XP\Video card
+ 1    - //matrix/share/upgrade/Latitude C600 - drivers XP\Dell 
+upgrade preparation tools
+ 2    - //matrix/share/upgrade/Latitude C600 - drivers XP\Dell 32 
+Bit Diagnostics
+ 3    - //matrix/share/upgrade/Latitude C600 - drivers XP\ESS 
+Maestro 3i
+ 4    - //matrix/share/upgrade/Latitude C600 - drivers XP\3COM 10-
+100 Ethernet Network adaptater
+ 5    - //matrix/share/upgrade/Latitude C600 - drivers XP\3COM 10-
+100 & V.90 LAN Mini-PCI driver
+
+GetFullPath for \\matrix\share\doc is \\matrix\share\doc
+GetFullPath for //matrix/share/doc is \\matrix\share\doc
+
+==> we could remark than for MS \\server\name is the same 
+than //server/name
+
+Best Regards,
+Gilles
+
+PS: 
+---
+I will try to search this evening if other MS method make the same 
+expansion than the MS Path.GetFullPath () method. I will start to 
+focus on the method from the Path class