]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of nlink
authorChristopher Faylor <me@cgf.cx>
Sat, 18 May 2002 21:07:18 +0000 (21:07 +0000)
committerChristopher Faylor <me@cgf.cx>
Sat, 18 May 2002 21:07:18 +0000 (21:07 +0000)
consistent for remote files.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_disk_file.cc

index 28a22d5084eb84083440905083439f66b9756ba0..31559a0d9e2484f4012058cf4d1b09d971e9c6b2 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-18  Christopher Faylor  <cgf@redhat.com>
+
+       * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
+       nlink consistent for remote files.
+
 2002-05-18  Christopher Faylor  <cgf@redhat.com>
 
        * path.cc (path_conv::check): Always set executable bit for executable
index 38c6bd26f8301d144b334ce1900d41f2fcfb0318..99f8b7ab0e27959e7b5c487de14837ba99d62412 100644 (file)
@@ -107,8 +107,7 @@ fhandler_disk_file::fstat (struct __stat64 *buf, path_conv *pc)
       /* Unfortunately the count of 2 confuses `find (1)' command. So
         let's try it with `1' as link count. */
       if (pc->isdir ())
-       buf->st_nlink = (pc->isremote ()
-                        ? 1 : num_entries (pc->get_win32 ()));
+       buf->st_nlink = pc->isremote () ? 1 : num_entries (pc->get_win32 ());
       close ();
     }
   else if (pc->exists ())
@@ -118,8 +117,8 @@ fhandler_disk_file::fstat (struct __stat64 *buf, path_conv *pc)
       WIN32_FIND_DATA wfd;
       HANDLE handle;
       buf->st_nlink = 1;
-      if (pc->isdir () && pc->isremote ())
-       buf->st_nlink = num_entries (pc->get_win32 ());
+      if (pc->isdir ())
+       buf->st_nlink = pc->isremote () ? 1 : num_entries (pc->get_win32 ());
       buf->st_dev = FHDEVN (FH_DISK) << 8;
       buf->st_ino = hash_path_name (0, pc->get_win32 ());
       if (pc->isdir ())
This page took 0.033891 seconds and 5 git commands to generate.