From 11054fc9f9e4678044f9fc8d3e536182ea8b499f Mon Sep 17 00:00:00 2001 From: angel Date: Sun, 19 Apr 2020 16:52:46 +0200 Subject: [PATCH] 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. --- Applications/FileManager/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index 4350056dd3..b5d22c8976 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -684,7 +684,7 @@ int run_in_windowed_mode(RefPtr 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(),