diff --git a/Userland/Utilities/stat.cpp b/Userland/Utilities/stat.cpp index 0f0a2ab232..b34a893284 100644 --- a/Userland/Utilities/stat.cpp +++ b/Userland/Utilities/stat.cpp @@ -99,7 +99,11 @@ ErrorOr serenity_main(Main::Arguments arguments) bool had_error = false; for (auto& file : files) { - had_error |= stat(file, should_follow_links).is_error(); + auto r = stat(file, should_follow_links); + if (r.is_error()) { + had_error = true; + warnln("stat: cannot stat '{}': {}", file, strerror(r.error().code())); + } } return had_error;