aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-12 03:12:36 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-12 03:12:36 +0100
commitea684c6aaf23ead57fac74c3ceaa651c1ae625ec (patch)
treeda6e00ce493280918139e6d4ae504be23ad8af8c /coreutils
parent8345b2bd5ea28bd8d07886e615b9c2d5ab35477d (diff)
downloadbusybox-ea684c6aaf23ead57fac74c3ceaa651c1ae625ec.tar.gz
ls: fix handling of symlinks by option -1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/ls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 19c868ca4..847fdec07 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1,6 +1,5 @@
/* vi: set sw=4 ts=4: */
/*
- * tiny-ls.c version 0.1.0: A minimalist 'ls'
* Copyright (C) 1996 Brian Candler <B.Candler@pobox.com>
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
@@ -1145,7 +1144,10 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
do {
cur = my_stat(*argv, *argv,
/* follow links on command line unless -l, -s or -F: */
- !((all_fmt & (STYLE_LONG|LIST_BLOCKS)) || (option_mask32 & OPT_F))
+ !((all_fmt & STYLE_MASK) == STYLE_LONG
+ || (all_fmt & LIST_BLOCKS)
+ || (option_mask32 & OPT_F)
+ )
/* ... or if -H: */
|| (option_mask32 & OPT_H)
);