]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
`ls -Fd symlink-to-directory' would print a trailing `/'
authorJim Meyering <jim@meyering.net>
Tue, 20 Feb 2001 08:16:47 +0000 (08:16 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 20 Feb 2001 08:16:47 +0000 (08:16 +0000)
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.

src/ls.c

index c5701698c3a37df7a1676a2fb92b0ee6159a6666..6f7bae6ef09428835ffab7071d4f5ff885e2ffb3 100644 (file)
--- 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;