зеркало из https://github.com/mono/mail-archives.git
128 строки
4.9 KiB
HTML
128 строки
4.9 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Mono-bugs] [Bug 47691][Nor] Changed - incorrect file Uri path properties
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
|
||
|
<LINK REL="Previous" HREF="017218.html">
|
||
|
<LINK REL="Next" HREF="017220.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Mono-bugs] [Bug 47691][Nor] Changed - incorrect file Uri path properties
|
||
|
</H1>
|
||
|
<B>bugzilla-daemon@bugzilla.ximian.com
|
||
|
</B>
|
||
|
<A HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com"
|
||
|
TITLE="[Mono-bugs] [Bug 47691][Nor] Changed - incorrect file Uri path properties">bugzilla-daemon@bugzilla.ximian.com
|
||
|
</A><BR>
|
||
|
<I>Fri, 11 Jun 2004 06:49:13 -0400 (EDT)</I>
|
||
|
<P><UL>
|
||
|
<LI> Previous message: <A HREF="017218.html">[Mono-bugs] [Bug 59946][Blo] Changed - Unexpected Exception in DbDataAdapter.Update(DataTable)
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="017220.html">[Mono-bugs] [Bug 60004][Wis] New - Cannot open windows.forms application.
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#17219">[ date ]</a>
|
||
|
<a href="thread.html#17219">[ thread ]</a>
|
||
|
<a href="subject.html#17219">[ subject ]</a>
|
||
|
<a href="author.html#17219">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>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 <A HREF="mailto:atsushi@ximian.com.">atsushi@ximian.com.</A>
|
||
|
|
||
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=47691">http://bugzilla.ximian.com/show_bug.cgi?id=47691</A>
|
||
|
|
||
|
--- shadow/47691 2004-06-10 16:41:29.000000000 -0400
|
||
|
+++ shadow/47691.tmp.29275 2004-06-11 06:49:13.000000000 -0400
|
||
|
@@ -188,6 +188,64 @@
|
||
|
|
||
|
------- Additional Comments From <A HREF="mailto:atsushi@ximian.com">atsushi@ximian.com</A> 2004-06-10 15:17 -------
|
||
|
Thanks, should be fixed in cvs.
|
||
|
|
||
|
------- Additional Comments From <A HREF="mailto:chris@turchin.net">chris@turchin.net</A> 2004-06-10 16:41 -------
|
||
|
works now. thanks atsushi!
|
||
|
+
|
||
|
+------- Additional Comments From <A HREF="mailto:atsushi@ximian.com">atsushi@ximian.com</A> 2004-06-11 06:49 -------
|
||
|
+I noticed that file URI must not disregard fragment identifier '#'. I
|
||
|
+retried on MS.NET and noticed that '#' is regarded as file name
|
||
|
+character only when constructed by absolute file path. My patch was
|
||
|
+wrong for pure file: scheme.
|
||
|
+
|
||
|
+As a quick summary, you can only use LocalPath directly. You cannot
|
||
|
+use AbsoluteUri; it is escaped.
|
||
|
+
|
||
|
+I wrote an example code:
|
||
|
+
|
||
|
+using System;
|
||
|
+
|
||
|
+public class Test
|
||
|
+{
|
||
|
+ public static void Main ()
|
||
|
+ {
|
||
|
+ Uri uri;
|
||
|
+
|
||
|
+ uri = new Uri ("<A HREF="file:///c:/cygwin/home/ginga/c#books"">file:///c:/cygwin/home/ginga/c#books"</A>);
|
||
|
+ DumpUri (uri);
|
||
|
+ uri = new Uri ("c:/cygwin/home/ginga/c#books");
|
||
|
+ DumpUri (uri);
|
||
|
+ uri = new Uri (new Uri
|
||
|
+("c:/cygwin/home/ginga/c#books"), "f#books");
|
||
|
+ DumpUri (uri);
|
||
|
+ }
|
||
|
+
|
||
|
+ public static void DumpUri (Uri uri)
|
||
|
+ {
|
||
|
+ Console.WriteLine ("localpath = [{0}]", uri.LocalPath);
|
||
|
+ Console.WriteLine ("abspath = [{0}]", uri.AbsolutePath);
|
||
|
+ }
|
||
|
+}
|
||
|
+
|
||
|
+The results were:
|
||
|
+
|
||
|
+./opaque.exe
|
||
|
+localpath = [c:\cygwin\home\ginga\c]
|
||
|
+abspath = [c:/cygwin/home/ginga/c]
|
||
|
+localpath = [c:\cygwin\home\ginga\c#books]
|
||
|
+abspath = [c:/cygwin/home/ginga/c%23books]
|
||
|
+localpath = [c:\cygwin\home\ginga\f]
|
||
|
+abspath = [c:/cygwin/home/ginga/f]
|
||
|
+
|
||
|
+The experiment above shows that LocalPath preserves '#', but
|
||
|
+AbsoluteUri does not preserve '#' and escapes it into "%23". I think
|
||
|
+we had better make Uri class to match with this behavior.
|
||
|
+
|
||
|
+Interestingly, on the third case, "f#books" is not recognized as a
|
||
|
+valid file path, but is regarded just as a fragment identifier. That
|
||
|
+means, we cannot create such file path from relative URI constructor.
|
||
|
+
|
||
|
+Note that we still have another bug with related to Unix file path:
|
||
|
+#58301.
|
||
|
+
|
||
|
+The fix for above is now checked in cvs.
|
||
|
|
||
|
</PRE>
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI> Previous message: <A HREF="017218.html">[Mono-bugs] [Bug 59946][Blo] Changed - Unexpected Exception in DbDataAdapter.Update(DataTable)
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="017220.html">[Mono-bugs] [Bug 60004][Wis] New - Cannot open windows.forms application.
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#17219">[ date ]</a>
|
||
|
<a href="thread.html#17219">[ thread ]</a>
|
||
|
<a href="subject.html#17219">[ subject ]</a>
|
||
|
<a href="author.html#17219">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
</body></html>
|