From 5c3743e3bb9c564d48b54be00b9c6e3852b33b02 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 13 Oct 2009 21:51:50 +0000 Subject: [PATCH] ls: Make -p not inhibit following symlinks. According to the man page, when neither -H/-L nor -F/-d/-l are given, -H is implied. This agrees with POSIX, GNU ls and Solaris ls. This means that -p, although it is very similar to -F, does not prevent the implicit following of symlinks. PR: standards/128546 --- bin/ls/ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 644bc96eb5fe..5338071fa547 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -399,7 +399,7 @@ main(int argc, char *argv[]) * If not -F, -d or -l options, follow any symbolic links listed on * the command line. */ - if (!f_longform && !f_listdir && !f_type) + if (!f_longform && !f_listdir && (!f_type || f_slash)) fts_options |= FTS_COMFOLLOW; /*