1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

FileManager+HackStudio+SpaceAnalyzer: Use File::can_delete_or_move

This commit is contained in:
Karol Kosek 2021-10-09 18:13:43 +02:00 committed by Linus Groh
parent b810f7f88a
commit e45434c0c7
3 changed files with 3 additions and 13 deletions

View file

@ -555,7 +555,7 @@ bool DirectoryView::can_modify_current_selection()
// FIXME: remove once Clang formats this properly.
// clang-format off
return selections.first_matching([&](auto& index) {
return !Core::System::access(node(index.parent()).full_path(), W_OK).is_error();
return Core::File::can_delete_or_move(node(index).full_path());
}).has_value();
// clang-format on
}