mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +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:
parent
105f741131
commit
bdc028da1c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue