mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
LibCore: Use ErrorOr<T> for Core::File::remove()
This function returns a subclass of Error, which is now possible.
This commit is contained in:
parent
e253cf694e
commit
c7e62d448c
5 changed files with 17 additions and 14 deletions
|
@ -40,7 +40,7 @@ int main(int argc, char** argv)
|
|||
auto result = Core::File::remove(path, recursive ? Core::File::RecursionMode::Allowed : Core::File::RecursionMode::Disallowed, force);
|
||||
|
||||
if (result.is_error()) {
|
||||
warnln("rm: cannot remove '{}': {}", path, result.error().error_code);
|
||||
warnln("rm: cannot remove '{}': {}", path, static_cast<Error const&>(result.error()));
|
||||
had_errors = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue