Author: miguel
Date: 2006-12-31 23:40:13 -0500 (Sun, 31 Dec 2006)
New Revision: 70302

Modified:
   trunk/mono/mono/io-layer/ChangeLog
   trunk/mono/mono/io-layer/io-portability.c
Log:
2006-12-31  Miguel de Icaza  <[EMAIL PROTECTED]>

        * io-portability.c (find_file): Do not abort if an empty filename
        has been passed.  This fixes the case where MONO_IOMAP=all would
        assert if Directory.Exists ("") was called.

Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog  2007-01-01 04:40:01 UTC (rev 70301)
+++ trunk/mono/mono/io-layer/ChangeLog  2007-01-01 04:40:13 UTC (rev 70302)
@@ -1,4 +1,9 @@
+2006-12-31  Miguel de Icaza  <[EMAIL PROTECTED]>
 
+       * io-portability.c (find_file): Do not abort if an empty filename
+       has been passed.  This fixes the case where MONO_IOMAP=all would
+       assert if Directory.Exists ("") was called.
+
 Mon Dec 18 14:54:37 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
 
        * processes.c: moved a free on the error path.

Modified: trunk/mono/mono/io-layer/io-portability.c
===================================================================
--- trunk/mono/mono/io-layer/io-portability.c   2007-01-01 04:40:01 UTC (rev 
70301)
+++ trunk/mono/mono/io-layer/io-portability.c   2007-01-01 04:40:13 UTC (rev 
70302)
@@ -188,9 +188,12 @@
        while(components[num_components] != NULL) {
                num_components++;
        }
-       g_assert (num_components > 0);
+       g_free (new_pathname);
        
-       g_free (new_pathname);
+       if (num_components == 0){
+               return NULL;
+       }
+       
 
        new_components = (gchar **)g_new0 (gchar **, num_components + 1);
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to