du: Print to stderr rather than stdout when directory can't be read

This commit is contained in:
Tim Ledbetter 2023-05-22 18:17:23 +01:00 committed by Jelle Raaijmakers
parent 5dfb4e8066
commit abdca9b766
Notes: sideshowbarker 2024-07-17 20:33:50 +09:00

View File

@ -143,7 +143,7 @@ ErrorOr<u64> print_space_usage(DeprecatedString const& path, DuOption const& du_
auto di = Core::DirIterator(path, Core::DirIterator::SkipParentAndBaseDir);
if (di.has_error()) {
auto error = di.error();
outln("du: cannot read directory '{}': {}", path, error);
warnln("du: cannot read directory '{}': {}", path, error);
return error;
}