Author: dick
Date: 2007-09-26 08:51:16 -0400 (Wed, 26 Sep 2007)
New Revision: 86390

Modified:
   trunk/mono/mono/io-layer/ChangeLog
   trunk/mono/mono/io-layer/io-portability.c
Log:

2007-09-26  Dick Porter  <[EMAIL PROTECTED]>

        * io-portability.c (_wapi_io_scandir): Only update the error
        status of glob() when performing a secondary glob() if the first
        returned an error.  Fixes bug 325107.




Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog  2007-09-26 12:48:31 UTC (rev 86389)
+++ trunk/mono/mono/io-layer/ChangeLog  2007-09-26 12:51:16 UTC (rev 86390)
@@ -1,3 +1,9 @@
+2007-09-26  Dick Porter  <[EMAIL PROTECTED]>
+
+       * io-portability.c (_wapi_io_scandir): Only update the error
+       status of glob() when performing a secondary glob() if the first
+       returned an error.  Fixes bug 325107.
+
 2007-09-12  Marek Habersack  <[EMAIL PROTECTED]>
 
        * io-portability.c: options_init moved to

Modified: trunk/mono/mono/io-layer/io-portability.c
===================================================================
--- trunk/mono/mono/io-layer/io-portability.c   2007-09-26 12:48:31 UTC (rev 
86389)
+++ trunk/mono/mono/io-layer/io-portability.c   2007-09-26 12:51:16 UTC (rev 
86390)
@@ -534,11 +534,16 @@
                 * TODO: should this be a MONO_IOMAP option?
                 */
                gchar *pattern2 = g_strndup (pattern, strlen (pattern) - 2);
+               gint result2;
                
                g_dir_rewind (dir);
-               result = _wapi_glob (dir, pattern2, flags | WAPI_GLOB_APPEND | 
WAPI_GLOB_UNIQUE, &glob_buf);
+               result2 = _wapi_glob (dir, pattern2, flags | WAPI_GLOB_APPEND | 
WAPI_GLOB_UNIQUE, &glob_buf);
 
                g_free (pattern2);
+
+               if (result != 0) {
+                       result = result2;
+               }
        }
        
        g_dir_close (dir);

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

Reply via email to