diff options
author | Jim Meyering <jim@meyering.net> | 2007-07-31 10:46:31 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-07-31 12:10:11 +0200 |
commit | fd9a6e860b7f196728a975599947a09a316be260 (patch) | |
tree | 31d53da2df9076c53cb89d75cc77b37b022d7f40 /src | |
parent | 3b03442c5423562749982e159111782db6812b14 (diff) | |
download | coreutils-fd9a6e860b7f196728a975599947a09a316be260.tar.xz |
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 <jim@meyering.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/du.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -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. */ |