mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
HackStudio: Fix error handling logic in delete_action
The `result.is_error()` check was inverted, causing a crash.
This commit is contained in:
parent
11c53a1944
commit
542e18b367
Notes:
sideshowbarker
2024-07-17 19:02:52 +09:00
Author: https://github.com/Daste745
Commit: 542e18b367
Pull-request: https://github.com/SerenityOS/serenity/pull/12418
1 changed files with 1 additions and 1 deletions
|
@ -553,7 +553,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, false); result.is_error()) {
|
||||
auto& error = result.error();
|
||||
if (is_directory) {
|
||||
GUI::MessageBox::show(window(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue