summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-09-01 11:31:14 +0200
committerJim Meyering <meyering@redhat.com>2009-09-01 12:10:07 +0200
commit228c8e9eece21738070a986ff664f41d35b7e52e (patch)
treec7fe31b9d997e3910c882e08f81e182d3d874857 /src/du.c
parent1ce27f74ec9aa20214e28969799c0f569288daf1 (diff)
downloadcoreutils-228c8e9eece21738070a986ff664f41d35b7e52e.tar.xz
chcon, chmod, chgrp, chown, du: do not ignore fts_close failure
This is probably never visible, but who knows... * src/chcon.c (process_files): Don't ignore fts_close failure. * src/chmod.c (process_files): Likewise. * src/chown-core.c (chown_files): Likewise. * src/du.c (du_files): Likewise.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/du.c b/src/du.c
index 24ed5e639..16a7b9b3e 100644
--- a/src/du.c
+++ b/src/du.c
@@ -642,10 +642,8 @@ du_files (char **files, int bit_flags)
ok &= process_file (fts, ent);
}
- /* Ignore failure, since the only way it can do so is in failing to
- return to the original directory, and since we're about to exit,
- that doesn't matter. */
- fts_close (fts);
+ if (fts_close (fts) != 0)
+ ok = false;
}
return ok;