summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>2013-09-05 02:17:56 +0100
committerPádraig Brady <P@draigBrady.com>2013-09-05 02:50:11 +0100
commitb86437e1262f5e171db2d7372a4e13cd621ab706 (patch)
tree18e34578088180e9f0778853fd58d3c4760baa7f /src
parent0603ff3784c353cf096a02b825f76fd3a08ac756 (diff)
downloadcoreutils-b86437e1262f5e171db2d7372a4e13cd621ab706.tar.xz
ls: fix possible incorrect exit status when recursing directories
If there is an error reading a directory that was referenced through recursion, rather than directly on the command line, then exit with the "less serious" exit code, rather than the "serious" exit code reserved for command line arguments. This issue was introduced in commit v5.2.1-1908-gb58dea5 * src/ls.c (print_dir): Ensure that the command_line_arg param is false for directories being recursed into. * NEWS: Mention the bug fix. Fixes http://bugs.gnu.org/15249
Diffstat (limited to 'src')
-rw-r--r--src/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 1652bcf94..512d65e2d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2647,7 +2647,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
contents listed rather than being mentioned here as files. */
if (recursive)
- extract_dirs_from_files (name, command_line_arg);
+ extract_dirs_from_files (name, false);
if (format == long_format || print_block_size)
{