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:
parent
e253cf694e
commit
c7e62d448c
Notes:
sideshowbarker
2024-07-18 01:24:03 +09:00
Author: https://github.com/awesomekling
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