1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 11:18:13 +00:00

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.
This commit is contained in:
Tim Schumacher 2022-07-20 23:02:35 +02:00 committed by Andreas Kling
parent d2d6e7835e
commit 220a50111a

View file

@ -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;
}