summaryrefslogtreecommitdiffstats
path: root/bin/ls/ls.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2009-10-13 21:51:50 +0000
committerjilles <jilles@FreeBSD.org>2009-10-13 21:51:50 +0000
commit3aead1369fa2714477a9fcbb798ceb9d3e842f8b (patch)
tree4353b957e5a5b4b272c4c92bf1d77f613631fa7e /bin/ls/ls.c
parent4fdff21cbb6547c80b57bdc57b4340925039ca59 (diff)
downloadFreeBSD-src-3aead1369fa2714477a9fcbb798ceb9d3e842f8b.zip
FreeBSD-src-3aead1369fa2714477a9fcbb798ceb9d3e842f8b.tar.gz
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
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r--bin/ls/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 644bc96..5338071 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;
/*
OpenPOWER on IntegriCloud