Author: spouliot
Date: 2005-04-05 07:57:59 -0400 (Tue, 05 Apr 2005)
New Revision: 42557
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
Log:
2005-04-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* AssemblyBuilder.cs: Don't call GetCurrentDirectory if building an
assembly that will never be serialized to disk (because CAS may not
allow disk access but still allow generating a in-memory assembly).
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
2005-04-05 11:22:35 UTC (rev 42556)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
2005-04-05 11:57:59 UTC (rev 42557)
@@ -120,13 +120,17 @@
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern void basic_init (AssemblyBuilder ab);
- internal AssemblyBuilder (AssemblyName n, string directory,
AssemblyBuilderAccess access, bool corlib_internal) {
+ internal AssemblyBuilder (AssemblyName n, string directory,
AssemblyBuilderAccess access, bool corlib_internal)
+ {
name = n.Name;
- if (directory == null || directory == String.Empty)
+ this.access = (uint)access;
+
+ // don't call GetCurrentDirectory for Run-only builders
(CAS may not like that)
+ if (IsSave && (directory == null || directory ==
String.Empty)) {
dir = Directory.GetCurrentDirectory ();
- else
+ } else {
dir = directory;
- this.access = (uint)access;
+ }
/* Set defaults from n */
if (n.CultureInfo != null) {
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-04-05
11:22:35 UTC (rev 42556)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-04-05
11:57:59 UTC (rev 42557)
@@ -1,3 +1,9 @@
+2005-04-05 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * AssemblyBuilder.cs: Don't call GetCurrentDirectory if building an
+ assembly that will never be serialized to disk (because CAS may not
+ allow disk access but still allow generating a in-memory assembly).
+
2005-03-24 Miguel de Icaza <[EMAIL PROTECTED]>
* DynamicMethod.cs (CreateDelegate): Add second overload based on
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches