summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-21 08:49:24 +0000
committerJim Meyering <jim@meyering.net>2006-07-21 08:49:24 +0000
commit9e0a095be648284bdc8a47d2b01120fdb01c001f (patch)
treecb0053ddc797acfd3d54826a0112653883a3063c /src
parent2060c55141708d2ff09cc34d27c0a2a856a21c28 (diff)
downloadcoreutils-9e0a095be648284bdc8a47d2b01120fdb01c001f.tar.xz
Fix another bug: ls --indicator-style=file-type would call
stat for a symlink, even though it wasn't always needed. In some cases, that unnecessary stat would cause ls to fail. * src/ls.c (gobble_file): Don't treat symlinks specially (in requiring a stat syscall). Remove the offending exclusion. * NEWS: Mention the fix. * tests/ls/stat-dtype: New file/test, for the above fix. Also exercises the new df feature, below.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/ls.c b/src/ls.c
index ef0b902e5..4a42132ee 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2547,12 +2547,6 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
&& (type == symbolic_link || type == unknown))))
|| (format_needs_type
&& (type == unknown
-
- /* FIXME: remove this disjunct.
- I don't think we care about symlinks here, but for now
- this won't make a big performance difference. */
- || type == symbolic_link
-
/* --indicator-style=classify (aka -F)
requires that we stat each regular file
to see if it's executable. */