summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 04fa93cae..aa601fdc2 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4164,7 +4164,9 @@ print_color_indicator (const struct fileinfo *f, bool symlink_target)
type = C_STICKY;
}
else if (S_ISLNK (mode))
- type = ((!linkok && color_indicator[C_ORPHAN].string)
+ type = ((!linkok
+ && (!strncmp (color_indicator[C_LINK].string, "target", 6)
+ || color_indicator[C_ORPHAN].string))
? C_ORPHAN : C_LINK);
else if (S_ISFIFO (mode))
type = C_FIFO;