summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-21 07:15:16 +0000
committerJim Meyering <jim@meyering.net>2003-02-21 07:15:16 +0000
commit12508c923fafba81b377e36675fae5ffae2848de (patch)
treec398051f32014d96f3a2bec5a219eb170dfc4046 /src
parent23e52c28fb161781d7d01838d85a9ad8e82b60b3 (diff)
downloadcoreutils-12508c923fafba81b377e36675fae5ffae2848de.tar.xz
(process_file): Always reset size_to_propagate_to_parent for
--separate-dirs (-S).
Diffstat (limited to 'src')
-rw-r--r--src/du.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/du.c b/src/du.c
index b494cf481..c58559422 100644
--- a/src/du.c
+++ b/src/du.c
@@ -426,11 +426,12 @@ process_file (const char *file, const struct stat *sb, int file_type,
assert ((size_t) info->level == prev_level - 1);
size_to_propagate_to_parent = size_including_subdirs
= size + sum[prev_level];
- if (opt_separate_dirs)
- size_to_propagate_to_parent = 0;
}
}
+ if (opt_separate_dirs)
+ size_to_propagate_to_parent = 0;
+
prev_level = info->level;
first_call = 0;