1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09: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:
Andreas Kling 2021-11-07 01:31:00 +01:00
parent e253cf694e
commit c7e62d448c
Notes: sideshowbarker 2024-07-18 01:24:03 +09:00
5 changed files with 17 additions and 14 deletions

View file

@ -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;
}