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
commit 9805f73704
Notes: sideshowbarker 2024-07-17 16:23:06 +09:00
10 changed files with 22 additions and 20 deletions

View file

@ -681,7 +681,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action()
}
bool is_directory = S_ISDIR(st.st_mode);
if (auto result = Core::File::remove(file, Core::File::RecursionMode::Allowed, false); result.is_error()) {
if (auto result = Core::File::remove(file, Core::File::RecursionMode::Allowed); result.is_error()) {
auto& error = result.error();
if (is_directory) {
GUI::MessageBox::show(window(),