mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-08 12:17:32 +00:00
cp: Print proper error message with strerror
When cp fails, now it prints an error string (strerror) instead of an error code.
This commit is contained in:
committed by
Brian Gianforcaro
parent
105f741131
commit
bdc028da1c
@@ -57,7 +57,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
if (result.error().tried_recursing)
|
||||
warnln("cp: -R not specified; omitting directory '{}'", source);
|
||||
else
|
||||
warnln("cp: unable to copy '{}' to '{}': {}", source, destination_path, static_cast<Error const&>(result.error()));
|
||||
warnln("cp: unable to copy '{}' to '{}': {}", source, destination_path, strerror(result.error().code()));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user