mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
FileManager+HackStudio+SpaceAnalyzer: Use File::can_delete_or_move
This commit is contained in:
parent
b810f7f88a
commit
e45434c0c7
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/krkk
Commit: e45434c0c7
Pull-request: https://github.com/SerenityOS/serenity/pull/17006
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
3 changed files with 3 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue