aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2009-10-13 21:51:50 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2009-10-13 21:51:50 +0000
commit5c3743e3bb9c564d48b54be00b9c6e3852b33b02 (patch)
tree4353b957e5a5b4b272c4c92bf1d77f613631fa7e /bin
parent680db4952ed4c54df72ebb8123132e6f26884525 (diff)
downloadsrc-5c3743e3bb9c564d48b54be00b9c6e3852b33b02.tar.gz
src-5c3743e3bb9c564d48b54be00b9c6e3852b33b02.zip
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
Notes
Notes: svn path=/head/; revision=198056
Diffstat (limited to 'bin')
-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 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;
/*