Author: mhabersack
Date: 2007-08-22 09:03:54 -0400 (Wed, 22 Aug 2007)
New Revision: 84614
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/appdomain.c
Log:
2007-08-22 Marek Habersack <[EMAIL PROTECTED]>
* appdomain.c (set_domain_search_path): cope with PrivateBinPath
containing a list of directories separated by ':'. MSDN docs say
the directories should be separated with ';'. Part of a bugfix for
bug #81446
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-08-22 12:21:28 UTC (rev 84613)
+++ trunk/mono/mono/metadata/ChangeLog 2007-08-22 13:03:54 UTC (rev 84614)
@@ -1,3 +1,10 @@
+2007-08-22 Marek Habersack <[EMAIL PROTECTED]>
+
+ * appdomain.c (set_domain_search_path): cope with PrivateBinPath
+ containing a list of directories separated by ':'. MSDN docs say
+ the directories should be separated with ';'. Part of a bugfix for
+ bug #81446
+
2007-08-21 Rodrigo Kumpera <[EMAIL PROTECTED]>
* class.c (mono_type_retrieve_from_typespec) : fixed the return type
Modified: trunk/mono/mono/metadata/appdomain.c
===================================================================
--- trunk/mono/mono/metadata/appdomain.c 2007-08-22 12:21:28 UTC (rev
84613)
+++ trunk/mono/mono/metadata/appdomain.c 2007-08-22 13:03:54 UTC (rev
84614)
@@ -718,8 +718,25 @@
npaths++;
if (setup->private_bin_path) {
+ gint slen;
utf8 = mono_string_to_utf8 (setup->private_bin_path);
- pvt_split = g_strsplit (utf8, G_SEARCHPATH_SEPARATOR_S, 1000);
+
+ /*
+ * As per MSDN documentation, AppDomainSetup.PrivateBinPath
contains a list of
+ * directories relative to ApplicationBase separated by
semicolons (see
+ *
http://msdn2.microsoft.com/en-us/library/system.appdomainsetup.privatebinpath.aspx)
+ * The loop below copes with the fact that some Unix
applications may use ':' (or
+ * System.IO.Path.PathSeparator) as the path search separator.
We replace it with
+ * ';' for the subsequent split.
+ *
+ * The issue was reported in bug #81446
+ */
+ slen = strlen (utf8);
+ for (i = 0; i < slen; i++)
+ if (utf8 [i] == ':')
+ utf8 [i] = ';';
+
+ pvt_split = g_strsplit (utf8, ';', 1000);
g_free (utf8);
for (tmp = pvt_split; *tmp; tmp++, npaths++);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches