summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-07-20 23:02:35 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-21 16:37:04 +0200
commit220a50111a95074c1ed6155cf3ce9cd419a3951e (patch)
treed2f62753b0591d7b45190a7b5fed59f6b077ea57 /Userland/Utilities
parentd2d6e7835ef2f8a894e8a2fff83a1627449057b1 (diff)
downloadserenity-220a50111a95074c1ed6155cf3ce9cd419a3951e.zip
du: Invert apparent-size behaviour
The apparent size is what `stat` says what we use. The non-apparent size is the blocks that we actually use on-disk.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/du.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/du.cpp b/Userland/Utilities/du.cpp
index cc402a0ac6..37c1fe626c 100644
--- a/Userland/Utilities/du.cpp
+++ b/Userland/Utilities/du.cpp
@@ -146,7 +146,7 @@ ErrorOr<off_t> print_space_usage(String const& path, DuOption const& du_option,
}
size_t size = path_stat.st_size;
- if (du_option.apparent_size) {
+ if (!du_option.apparent_size) {
constexpr auto block_size = 512;
size = path_stat.st_blocks * block_size;
}