diff options
author | Daste <stefankar1000@gmail.com> | 2022-02-10 17:42:53 +0100 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-10 21:41:05 +0200 |
commit | 542e18b367dc7d4a55e9abcda563207c182fdc7c (patch) | |
tree | 8fdbc700564d8fccfca147e520e2eced2cb5fb59 /Userland/DevTools | |
parent | 11c53a194424d671e8ecd594dd3f86c7025ed61b (diff) | |
download | serenity-542e18b367dc7d4a55e9abcda563207c182fdc7c.zip |
HackStudio: Fix error handling logic in delete_action
The `result.is_error()` check was inverted, causing a crash.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r-- | Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index ff1bf6de40..de9cc2a485 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -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(), |