From fd9a6e860b7f196728a975599947a09a316be260 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 31 Jul 2007 10:46:31 +0200 Subject: du: print size (probably incomplete) of each inaccessible directory * src/du.c (process_file): Print what we know of the size of a directory even when it is inaccessible. What we print is just the size of the directory itself, not counting any of its contents. * tests/du/inacc-dir: Test for this. * NEWS: Mention this change. Signed-off-by: Jim Meyering --- src/du.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/du.c b/src/du.c index 57678d93e..f9bd2e364 100644 --- a/src/du.c +++ b/src/du.c @@ -596,14 +596,9 @@ process_file (FTS *fts, FTSENT *ent) duinfo_add (&dulvl[level].ent, &dui); /* Even if this directory is unreadable or we can't chdir into it, - do let its size contribute to the total, ... */ + do let its size contribute to the total. */ duinfo_add (&tot_dui, &dui); - /* ... but don't print out a total for it, since without the size(s) - of any potential entries, it could be very misleading. */ - if (ent->fts_info == FTS_DNR) - return ok; - /* If we're not counting an entry, e.g., because it's a hard link to a file we've already counted (and --count-links), then don't print a line for it. */ -- cgit v1.2.3-54-g00ecf