summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/HackStudioWidget.cpp
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2021-10-09 18:13:43 +0200
committerLinus Groh <mail@linusgroh.de>2023-01-24 20:13:30 +0000
commite45434c0c7e5916e0dc2a497a9f3f1a00ceb802d (patch)
tree78175a30efef4373b4b8e0401e43ead6aa5d7a5b /Userland/DevTools/HackStudio/HackStudioWidget.cpp
parentb810f7f88af5346e0ec12b9fdecb855b34ebba66 (diff)
downloadserenity-e45434c0c7e5916e0dc2a497a9f3f1a00ceb802d.zip
FileManager+HackStudio+SpaceAnalyzer: Use File::can_delete_or_move
Diffstat (limited to 'Userland/DevTools/HackStudio/HackStudioWidget.cpp')
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
index 1fe5258218..2cad952518 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
@@ -1245,7 +1245,7 @@ void HackStudioWidget::configure_project_tree_view()
auto selections = m_project_tree_view->selection().indices();
auto it = selections.find_if([&](auto selected_file) {
- return access(m_project->model().full_path(selected_file.parent()).characters(), W_OK) == 0;
+ return Core::File::can_delete_or_move(m_project->model().full_path(selected_file));
});
bool has_permissions = it != selections.end();
m_tree_view_rename_action->set_enabled(has_permissions);