summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;