[Mono-list] Bug# 36936 fix (patch)

Konstantin Novitsky novitk@pobox.com
Sun, 19 Jan 2003 04:13:47 -0500


diff -bur mono/metadata/assembly.c mono/metadata.new/assembly.c
--- mono/metadata/assembly.c 2003-01-19 03:26:32.000000000 -0500
+++ mono/metadata.new/assembly.c 2003-01-19 03:21:14.000000000 -0500
@@ -114,6 +114,12 @@
  return NULL;
 }

+const char *
+mono_assembly_getrootdir (void)
+{
+        return default_path[0];
+}
+
 /**
  * mono_assembly_setrootdir:
  * @root_dir: The pathname of the root directory where we will locate
assemblies
diff -bur mono/metadata/assembly.h mono/metadata.new/assembly.h
--- mono/metadata/assembly.h 2003-01-19 03:21:36.000000000 -0500
+++ mono/metadata.new/assembly.h 2003-01-19 03:21:06.000000000 -0500
@@ -13,6 +13,7 @@
                                         const char       *basedir,
           MonoImageOpenStatus *status);
 void          mono_assembly_close      (MonoAssembly *assembly);
+const char *  mono_assembly_getrootdir (void);
 void          mono_assembly_setrootdir (const char *root_dir);
 void       mono_assembly_foreach    (GFunc func, gpointer user_data);
 void          mono_assembly_set_main   (MonoAssembly *assembly);
diff -bur mono/metadata/domain.c mono/metadata.new/domain.c
--- mono/metadata/domain.c 2003-01-19 03:21:36.000000000 -0500
+++ mono/metadata.new/domain.c 2003-01-19 03:21:27.000000000 -0500
@@ -225,13 +225,13 @@
   switch (status){
   case MONO_IMAGE_ERROR_ERRNO:
    g_print ("The assembly corlib.dll was not found or could not be
loaded.\n");
-   g_print ("It should have been installed in the `%s' directory.\n",
MONO_ASSEMBLIES);
+   g_print ("It should have been installed in the `%s' directory.\n",
mono_assembly_getrootdir());
    break;
   case MONO_IMAGE_IMAGE_INVALID:
-   g_print ("The file %s/corlib.dll is an invalid CIL image\n",
MONO_ASSEMBLIES);
+   g_print ("The file %s/corlib.dll is an invalid CIL image\n",
mono_assembly_getrootdir());
    break;
   case MONO_IMAGE_MISSING_ASSEMBLYREF:
-   g_print ("Minning assembly reference in %s/corlib.dll\n",
MONO_ASSEMBLIES);
+   g_print ("Minning assembly reference in %s/corlib.dll\n",
mono_assembly_getrootdir());
    break;
   case MONO_IMAGE_OK:
    /* to suppress compiler warning */