diff options
author | Jim Meyering <jim@meyering.net> | 2002-12-01 08:55:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-12-01 08:55:45 +0000 |
commit | 7274f62b83e3f3c6024be07432f475193efae0aa (patch) | |
tree | 9d9557adc99d9e897fdf6f4462f0c2e41cace1f9 | |
parent | d577b81792671a1d9eda8c78fc4b76fa76ff9740 (diff) | |
download | coreutils-7274f62b83e3f3c6024be07432f475193efae0aa.tar.xz |
(gobble_file): Remove the block of code that caused
`ls --color -F symlink-to-dir' to list the files in
`symlink-to-dir/.'. Now, it prints `symlink-to-dir@',
(just like `ls -F symlink-to-dir') but with the addition
of highlighting.
-rw-r--r-- | src/ls.c | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -2377,21 +2377,8 @@ gobble_file (const char *name, enum filetype type, int explicit_arg, /* Symbolic links to directories that are mentioned on the command line are automatically traced if not being listed as files. */ - if (explicit_arg && format != long_format - && S_ISDIR (linkstats.st_mode)) - { - /* Substitute the linked-to directory's name, but - save the real name in `linkname' for printing. */ - if (!immediate_dirs) - { - const char *tempname = name; - name = linkpath; - linkpath = files[files_index].linkname; - files[files_index].linkname = (char *) tempname; - } - files[files_index].stat = linkstats; - } - else + if (!explicit_arg || format == long_format + || !S_ISDIR (linkstats.st_mode)) { /* Get the linked-to file's mode for the filetype indicator in long listings. */ |