[Mono-bugs] [Bug 51313][Nor] New - Uri.LocalPath returns invalid path for relative paths
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 23 Nov 2003 15:19:56 -0500 (EST)
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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=51313
--- shadow/51313 2003-11-23 15:19:56.000000000 -0500
+++ shadow/51313.tmp.2356 2003-11-23 15:19:56.000000000 -0500
@@ -0,0 +1,36 @@
+Bug#: 51313
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Uri.LocalPath returns invalid path for relative paths
+
+The System.Uri class does not deal correctly with the following relative
+paths :
+
+./
+../
+
+An URI starting with ./ or ../ is considered as a valid file URI, but the
+LocalPath property does not return a path that corresponds with the
+original URI.
+
+eg. ./testfile will become //./testfile
+
+Apparently MS.NET does not consider a path starting with .\ or ..\ a valid
+uri (and throws an exception in this case), but Mono does. This is not a
+problem by itself, if the LocalPath property would return a valid path that
+actually corresponds with the URI.
+
+I attached a repro that demonstrates this behaviour.