From 9e0a095be648284bdc8a47d2b01120fdb01c001f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 21 Jul 2006 08:49:24 +0000 Subject: 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. --- src/ls.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') 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. */ -- cgit v1.2.3-54-g00ecf