From 220a50111a95074c1ed6155cf3ce9cd419a3951e Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 20 Jul 2022 23:02:35 +0200 Subject: 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. --- Userland/Utilities/du.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Utilities') 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 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; } -- cgit v1.2.3