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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-01-09 00:12:46 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-01-09 00:12:46 +0300
commitaa9f3665480a8ef1e62ab79964caf985a2d59cf1 (patch)
treebc8e121a7128c546adf71e5f43ca8aec0adc372f /winsup/cygwin/libc/fts.c
parent313f76f322fd695ff20d8fa3870cbed673b5998c (diff)
* libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
(fts_ufslinks): Fix using wrong structure member in Cygwin-specific code.
Diffstat (limited to 'winsup/cygwin/libc/fts.c')
-rw-r--r--winsup/cygwin/libc/fts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/libc/fts.c b/winsup/cygwin/libc/fts.c
index d0e77892d..c49d1e5fa 100644
--- a/winsup/cygwin/libc/fts.c
+++ b/winsup/cygwin/libc/fts.c
@@ -823,7 +823,7 @@ mem1: saved_errno = errno;
p->fts_info = FTS_NSOK;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
-#if defined(DT_DIR) && !defined(__CYGWIN__)
+#if defined(DT_DIR)
|| (nostat &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
#endif
@@ -1232,9 +1232,10 @@ fts_ufslinks(FTS *sp, const FTSENT *ent)
#ifdef __CYGWIN__
/* The link count is reliable in Cygwin's directory
stat structures, unless the link count is 1.
- This indicates a remote filesystem on which Cygwin
+ This indicates a filesystem on which Cygwin
refuses to count the directory links for speed. */
- priv->ftsp_linksreliable = (ent->fts_dev == 1) ? 0 : 1;
+ priv->ftsp_linksreliable = (ent->fts_nlink == 1)
+ ? 0 : 1;
#else
priv->ftsp_linksreliable = 0;
for (cpp = ufslike_filesystems; *cpp; cpp++) {