[Mono-bugs] [Bug 75443][Wis] Changed - DirectoryInfo.FullName strips directory separator chars from end

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jul 2 11:10:47 EDT 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 sebastien at ximian.com.

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

--- shadow/75443	2005-07-02 06:02:22.000000000 -0400
+++ shadow/75443.tmp.1139	2005-07-02 11:10:47.000000000 -0400
@@ -2,16 +2,16 @@
 Product: Mono: Class Libraries
 Version: 1.1
 OS: GNU/Linux [Other]
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
-AssignedTo: mono-bugs at ximian.com                            
+AssignedTo: sebastien at ximian.com                            
 ReportedBy: allan at imeem.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
 Summary: DirectoryInfo.FullName strips directory separator chars from end
@@ -54,6 +54,44 @@
 "something" and then a directory separator character.
 
 How often does this happen? 
 every time.
 
 Additional Information:
+
+------- Additional Comments From sebastien at ximian.com  2005-07-02 11:10 -------
+This seems to be a special case. Both Fx 1.1 and 2.0 beta2 returns the
+same string (different from Mono) but all other properties seems ok.
+The same problem occurs with AltDirectorySeparatorChar (which is
+transformed into DirectorySeparatorChar).
+
+
+using System;
+using System.IO;
+
+namespace DirInfo
+{
+	class Class1
+	{
+		[STAThread]
+		static void Main(string[] args)
+		{
+			string dir = "something" + Path.DirectorySeparatorChar;
+			TestDir (dir);
+
+			dir = "something" + Path.AltDirectorySeparatorChar;
+			TestDir (dir);
+		}
+
+		static void TestDir (string dir)
+		{
+			DirectoryInfo blargle = new DirectoryInfo (dir);
+			Console.WriteLine (dir);
+			Console.WriteLine ("FullName: {0}", blargle.FullName);
+			Console.WriteLine ("Name: {0}", blargle.Name);
+			Console.WriteLine ("Parent: {0}", blargle.Parent);
+			Console.WriteLine ("Root: {0}", blargle.Root);
+			Console.WriteLine ("ToString(): {0}", blargle.ToString ());
+			Console.WriteLine ();
+		}
+	}
+}


More information about the mono-bugs mailing list