summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-02-20 08:16:47 +0000
committerJim Meyering <jim@meyering.net>2001-02-20 08:16:47 +0000
commit05c801ff0ce39f850abaa1733840b2fa24ab5258 (patch)
treecf28812e4531e87446929ddecc0100134af5047f /src
parentc74553f39872020e2f050bb771b3485f434e7b2a (diff)
downloadcoreutils-05c801ff0ce39f850abaa1733840b2fa24ab5258.tar.xz
`ls -Fd symlink-to-directory' would print a trailing `/'
Now it prints a trailing `@'. (gobble_file): Don't clobber lstat stats of command line arguments when using -d and -F (--directory and --classify) options.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index c5701698c..6f7bae6ef 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1933,7 +1933,8 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
#endif
if (S_ISLNK (files[files_index].stat.st_mode)
- && (explicit_arg || format == long_format || check_symlink_color))
+ && ((explicit_arg && ! immediate_dirs)
+ || format == long_format || check_symlink_color))
{
char *linkpath;
struct stat linkstats;