зеркало из https://github.com/mono/mail-archives.git
167 строки
5.9 KiB
HTML
167 строки
5.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 40306][Wis] New - mono_assembly_open fails under WIN32 platform
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40rocky.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="004308.html">
|
|
<LINK REL="Next" HREF="004312.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 40306][Wis] New - mono_assembly_open fails under WIN32 platform
|
|
</H1>
|
|
<B>bugzilla-daemon@rocky.ximian.com
|
|
</B>
|
|
<A HREF="mailto:bugzilla-daemon%40rocky.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 40306][Wis] New - mono_assembly_open fails under WIN32 platform">bugzilla-daemon@rocky.ximian.com
|
|
</A><BR>
|
|
<I>Wed, 26 Mar 2003 05:53:02 -0500 (EST)</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="004308.html">[Mono-bugs] [Bug 40297][Wis] Changed - Marshalling works to, but not from libGSL
|
|
</A></li>
|
|
<LI> Next message: <A HREF="004312.html">[Mono-bugs] [Bug 40297][Nor] Changed - Marshalling works to, but not from libGSL
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#4311">[ date ]</a>
|
|
<a href="thread.html#4311">[ thread ]</a>
|
|
<a href="subject.html#4311">[ subject ]</a>
|
|
<a href="author.html#4311">[ 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:imitko@openlinksw.co.uk.">imitko@openlinksw.co.uk.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=40306">http://bugzilla.ximian.com/show_bug.cgi?id=40306</A>
|
|
|
|
--- shadow/40306 Wed Mar 26 05:53:02 2003
|
|
+++ shadow/40306.tmp.27485 Wed Mar 26 05:53:02 2003
|
|
@@ -0,0 +1,103 @@
|
|
+Bug#: 40306
|
|
+Product: Mono/Runtime
|
|
+Version: unspecified
|
|
+OS:
|
|
+OS Details:
|
|
+Status: NEW
|
|
+Resolution:
|
|
+Severity:
|
|
+Priority: Wishlist
|
|
+Component: misc
|
|
+AssignedTo: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+ReportedBy: <A HREF="mailto:imitko@openlinksw.co.uk">imitko@openlinksw.co.uk</A>
|
|
+QAContact: <A HREF="mailto:mono-bugs@ximian.com">mono-bugs@ximian.com</A>
|
|
+TargetMilestone: ---
|
|
+URL:
|
|
+Cc:
|
|
+Summary: mono_assembly_open fails under WIN32 platform
|
|
+
|
|
+Please fill in this template when reporting a bug, unless you know what you
|
|
+are doing.
|
|
+Description of Problem:
|
|
+
|
|
+When using mono under windows the mono_assembly_open fails on existing
|
|
+files. The problem is that g_filename_from_uri do not working correctly
|
|
+with file:/ URIs as for windows filesystem.
|
|
+
|
|
+
|
|
+Steps to reproduce the problem:
|
|
+1. try to load assembly with URL as <A HREF="file://c:/tmp/tmp.dll">file://c:/tmp/tmp.dll</A>
|
|
+2. load will fail
|
|
+
|
|
+Actual Results:
|
|
+cannot load assembly
|
|
+
|
|
+Expected Results:
|
|
+to load assembly
|
|
+
|
|
+How often does this happen?
|
|
+always
|
|
+
|
|
+Additional Information:
|
|
+
|
|
+simple program to demonstrate g_filename_from_uri problem under windows
|
|
+----------------------------------
|
|
+#include <stdio.h>
|
|
+#include <glib.h>
|
|
+
|
|
+void main (int argc, char ** argv)
|
|
+{
|
|
+ GError *error = NULL;
|
|
+ gchar * fname;
|
|
+
|
|
+ fname = g_filename_from_uri (argv[1], NULL, &error);
|
|
+ if (error != NULL)
|
|
+ fprintf (stderr, "error: %s\n", error->message);
|
|
+ else
|
|
+ fprintf (stderr, "%s\n", fname);
|
|
+}
|
|
+
|
|
+<<<< a result from execution
|
|
+$ a.out "<A HREF="file://c:/a/b/c"">file://c:/a/b/c"</A>
|
|
+error: The hostname of the URI '<A HREF="file://c:/a/b/c'">file://c:/a/b/c'</A> is invalid
|
|
+
|
|
+<<<<<<<<<<<<<<<< a patch which makes mono to work with these URIs
|
|
+Index: mono/metadata/appdomain.c
|
|
+===================================================================
|
|
+RCS file: /mono/mono/mono/metadata/appdomain.c,v
|
|
+retrieving revision 1.76
|
|
+diff -u -b -B -r1.76 appdomain.c
|
|
+--- mono/metadata/appdomain.c 19 Mar 2003 16:26:33 -0000 1.76
|
|
++++ mono/metadata/appdomain.c 26 Mar 2003 10:41:38 -0000
|
|
+@@ -477,7 +477,12 @@
|
|
+ *tmp = g_filename_from_uri (*tmp, NULL, &error);
|
|
+ if (error != NULL) {
|
|
+ g_error_free (error);
|
|
++#ifdef PLATFORM_WIN32
|
|
++ *tmp = g_strdup (file + 7);
|
|
++ g_free (file);
|
|
++#else
|
|
+ *tmp = file;
|
|
++#endif
|
|
+ } else {
|
|
+ g_free (file);
|
|
+ }
|
|
+Index: mono/metadata/assembly.c
|
|
+===================================================================
|
|
+RCS file: /mono/mono/mono/metadata/assembly.c,v
|
|
+retrieving revision 1.56
|
|
+diff -u -b -B -r1.56 assembly.c
|
|
+--- mono/metadata/assembly.c 19 Mar 2003 16:26:33 -0000 1.56
|
|
++++ mono/metadata/assembly.c 26 Mar 2003 10:41:39 -0000
|
|
+@@ -341,7 +340,11 @@
|
|
+ fname = g_filename_from_uri (filename, NULL, &error);
|
|
+ if (error != NULL) {
|
|
+ g_error_free (error);
|
|
++#ifdef PLATFORM_WIN32
|
|
++ fname = g_strdup (filename + 7);
|
|
++#else
|
|
+ fname = g_strdup (filename);
|
|
++#endif
|
|
+ }
|
|
+ } else {
|
|
+ fname = g_strdup (filename);
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="004308.html">[Mono-bugs] [Bug 40297][Wis] Changed - Marshalling works to, but not from libGSL
|
|
</A></li>
|
|
<LI> Next message: <A HREF="004312.html">[Mono-bugs] [Bug 40297][Nor] Changed - Marshalling works to, but not from libGSL
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#4311">[ date ]</a>
|
|
<a href="thread.html#4311">[ thread ]</a>
|
|
<a href="subject.html#4311">[ subject ]</a>
|
|
<a href="author.html#4311">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|