Author: dick
Date: 2006-07-05 11:53:21 -0400 (Wed, 05 Jul 2006)
New Revision: 62269

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

2006-07-05  Dick Porter  <[EMAIL PROTECTED]>

        * io.c (GetFileAttributes, GetFileAttributesEx): Cope with
        dangling symlinks.  Fixes bug 78664.




Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog  2006-07-05 15:45:09 UTC (rev 62268)
+++ trunk/mono/mono/io-layer/ChangeLog  2006-07-05 15:53:21 UTC (rev 62269)
@@ -1,3 +1,8 @@
+2006-07-05  Dick Porter  <[EMAIL PROTECTED]>
+
+       * io.c (GetFileAttributes, GetFileAttributesEx): Cope with
+       dangling symlinks.  Fixes bug 78664.
+
 2006-06-23  Dick Porter  <[EMAIL PROTECTED]>
 
        * handles.c (handle_cleanup): 

Modified: trunk/mono/mono/io-layer/io.c
===================================================================
--- trunk/mono/mono/io-layer/io.c       2006-07-05 15:45:09 UTC (rev 62268)
+++ trunk/mono/mono/io-layer/io.c       2006-07-05 15:53:21 UTC (rev 62269)
@@ -3090,7 +3090,11 @@
        }
 
        result = stat (utf8_name, &buf);
-
+       if (result == -1 && errno == ENOENT) {
+               /* Might be a dangling symlink... */
+               result = lstat (utf8_name, &buf);
+       }
+       
        if (result != 0) {
                _wapi_set_last_error_from_errno ();
                g_free (utf8_name);
@@ -3150,6 +3154,11 @@
        }
 
        result = stat (utf8_name, &buf);
+       if (result == -1 && errno == ENOENT) {
+               /* Might be a dangling symlink... */
+               result = lstat (utf8_name, &buf);
+       }
+       
        g_free (utf8_name);
 
        if (result != 0) {

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

Reply via email to