summaryrefslogtreecommitdiffstats
path: root/libidu
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>1999-04-11 06:59:22 +0000
committerGreg McGary <greg@mcgary.org>1999-04-11 06:59:22 +0000
commit1518e08fd83e3474eda65701cc69583c095ffdc3 (patch)
treed87ef02bd5583bef571f6ba8f27427aecd194033 /libidu
parent1b9d4d5fc1eaacf39f8980adeed0ed646475470a (diff)
downloadidutils-1518e08fd83e3474eda65701cc69583c095ffdc3.tar.gz
idutils-1518e08fd83e3474eda65701cc69583c095ffdc3.tar.bz2
idutils-1518e08fd83e3474eda65701cc69583c095ffdc3.zip
* walker.c (classify_link): Only return 0 for zero-length files.
Keep directories, no matter what their size. DOS always returns zero size for directories. [From tbisp@uswest.net]
Diffstat (limited to 'libidu')
-rw-r--r--libidu/walker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libidu/walker.c b/libidu/walker.c
index 1a7b310..9a7372e 100644
--- a/libidu/walker.c
+++ b/libidu/walker.c
@@ -725,10 +725,10 @@ classify_link (struct file_link *flink, struct stat *stp)
flags |= FL_SYM_LINK;
}
#endif
- if (stp->st_size == 0)
- return 0;
- else if (S_ISDIR (stp->st_mode))
+ if (S_ISDIR (stp->st_mode))
flags |= FL_TYPE_DIR;
+ else if (stp->st_size == 0)
+ return 0;
else if (S_ISREG (stp->st_mode))
flags |= FL_TYPE_FILE;
else