Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-03-19 14:05:14 +0300
committerCorinna Vinschen <corinna@vinschen.de>2000-03-19 14:05:14 +0300
commit1b16b354fa345218ccf43d2482b0a8fb4682930f (patch)
tree3d2d392742d2c74037eaf989c80493c628c237c2 /winsup
parent5bc5ee4457a633ca8b47ec4264cdeee29b1c5342 (diff)
* syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/syscalls.cc6
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4c9903f10..1508dee87 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Sun Mar 19 12:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
+
Sat Mar 18 23:04:27 2000 Christopher Faylor <cgf@cygnus.com>
* times.cc: Fix extern declarations for variables that are exported but
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index e94e8ea32..a52faf8aa 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -986,7 +986,7 @@ stat_worker (const char *caller, const char *name, struct stat *buf,
/* See the comment 10 lines below */
if (atts != -1 && (atts & FILE_ATTRIBUTE_DIRECTORY))
buf->st_nlink =
- (dtype == DRIVE_REMOTE ? 2 : num_entries (win32_name));
+ (dtype == DRIVE_REMOTE ? 1 : num_entries (win32_name));
}
}
else
@@ -998,7 +998,9 @@ stat_worker (const char *caller, const char *name, struct stat *buf,
those subdirectories point to it.
This is too slow on remote drives, so we do without it and
set the number of links to 2. */
- buf->st_nlink = (dtype == DRIVE_REMOTE ? 2 : num_entries (win32_name));
+ /* Unfortunately the count of 2 confuses `find(1)' command. So
+ let's try it with `1' as link count. */
+ buf->st_nlink = (dtype == DRIVE_REMOTE ? 1 : num_entries (win32_name));
buf->st_dev = FHDEVN(FH_DISK) << 8;
buf->st_ino = hash_path_name (0, real_path.get_win32 ());
buf->st_mode = S_IFDIR | STD_RBITS | STD_XBITS;