1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibCore: Let File::remove return a normal ErrorOr

Having the file path in there is nice, but it makes us incompatible with
comfortable error propagation in everything that isn't File::remove.
This commit is contained in:
Tim Schumacher 2022-12-23 13:59:27 +01:00 committed by Tim Flynn
parent 7fa78b2456
commit 355e761a02
4 changed files with 10 additions and 18 deletions

View file

@ -368,8 +368,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (deletion_result.is_error()) {
auto retry_message_result = GUI::MessageBox::show(window,
DeprecatedString::formatted("Failed to delete \"{}\": {}. Retry?",
deletion_result.error().file,
static_cast<Error const&>(deletion_result.error())),
selected_node_path,
deletion_result.error()),
"Deletion failed"sv,
GUI::MessageBox::Type::Error,
GUI::MessageBox::InputType::YesNo);