1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

LibCore: Remove the force parameter from File::remove

About half of the usages were not using `force` anyways, and the other
half presumably just got confused about what "force" really means in
this context (which is "ignore nonexistent files").

The only 'legitimate' user, which is `rm`, instead now handles this
completely internally instead.
This commit is contained in:
Tim Schumacher 2022-12-23 14:19:42 +01:00 committed by Tim Flynn
parent 355e761a02
commit 9805f73704
10 changed files with 22 additions and 20 deletions

View file

@ -364,7 +364,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
while (try_again) {
try_again = false;
auto deletion_result = Core::File::remove(selected_node_path, Core::File::RecursionMode::Allowed, true);
auto deletion_result = Core::File::remove(selected_node_path, Core::File::RecursionMode::Allowed);
if (deletion_result.is_error()) {
auto retry_message_result = GUI::MessageBox::show(window,
DeprecatedString::formatted("Failed to delete \"{}\": {}. Retry?",