From 7f973b2886dfacfccafdaf93cfadf2a229fb37fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Thu, 1 Jan 2026 21:39:41 +0800 Subject: [PATCH] Fix the UID in the owner file changed when overwriting files in editor --- editor/docks/filesystem_dock.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cpp index fe945c187f..7170198f65 100644 --- a/editor/docks/filesystem_dock.cpp +++ b/editor/docks/filesystem_dock.cpp @@ -2034,6 +2034,18 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_cop } if (is_moved) { + Vector files_to_update; + for (KeyValue &E : file_renames) { + if (!files_to_update.has(E.key)) { + files_to_update.push_back(E.key); + } + if (!files_to_update.has(E.value)) { + files_to_update.push_back(E.value); + } + } + print_verbose("FileSystem: updating file infos."); + EditorFileSystem::get_singleton()->update_files(files_to_update); + int current_tab = EditorSceneTabs::get_singleton()->get_current_tab(); _update_resource_paths_after_move(file_renames, uids); _update_dependencies_after_move(file_renames, file_owners);