mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
FileManager: Fix recursive copy on drag
When a drag operation is accepted, we don't check whether the source nodes contain the destination directory. This could trigger an unwanted recursive copy.
This commit is contained in:
parent
fc09767872
commit
11054fc9f9
1 changed files with 1 additions and 1 deletions
|
@ -684,7 +684,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
return;
|
||||
|
||||
for (auto& url_to_copy : urls) {
|
||||
if (!url_to_copy.is_valid())
|
||||
if (!url_to_copy.is_valid() || url_to_copy.path() == target_node.full_path(directory_view.model()))
|
||||
continue;
|
||||
auto new_path = String::format("%s/%s",
|
||||
target_node.full_path(directory_view.model()).characters(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue