[Mono-bugs] [Bug 79622][Nor] New - Uri: UriFormatException on linux for files with colons

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Oct 8 07:57:08 EDT 2006


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 alex.olk at googlemail.com.

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

--- shadow/79622	2006-10-08 07:57:08.000000000 -0400
+++ shadow/79622.tmp.7561	2006-10-08 07:57:08.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 79622
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: alex.olk at googlemail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Uri: UriFormatException on linux for files with colons
+
+On linux filenames with a colon somewhere in the filename are valid (for
+example abcd:efgh).
+
+However, if you try to create an Uri from such a filename you get an
+UriFormatException.
+
+To reproduce create a file with 
+touch abcd:efgh
+
+Now run the testcase in the directory where the above file was created:
+
+using System;
+using System.IO;
+
+public class UriTest
+{
+	public static void Main ()
+	{
+		string [] files = Directory.GetFiles (Directory.GetCurrentDirectory ());
+
+		foreach (string f in files) {
+			Console.WriteLine ("filename: " + f);
+
+			Uri uri = new Uri (f);
+		
+			Console.WriteLine ("uri: " + uri.ToString ());
+		}
+	}
+}


More information about the mono-bugs mailing list