Skip to content

Commit 4036e90

Browse files
authored
Merge pull request #114499 from Rindbee/fix-uid-changed-in-owner-file-when-overwrite
Fix the UID in the owner file changed when overwriting files in editor
2 parents b8e4523 + 7f973b2 commit 4036e90

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

editor/docks/filesystem_dock.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,18 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_cop
20342034
}
20352035

20362036
if (is_moved) {
2037+
Vector<String> files_to_update;
2038+
for (KeyValue<String, String> &E : file_renames) {
2039+
if (!files_to_update.has(E.key)) {
2040+
files_to_update.push_back(E.key);
2041+
}
2042+
if (!files_to_update.has(E.value)) {
2043+
files_to_update.push_back(E.value);
2044+
}
2045+
}
2046+
print_verbose("FileSystem: updating file infos.");
2047+
EditorFileSystem::get_singleton()->update_files(files_to_update);
2048+
20372049
int current_tab = EditorSceneTabs::get_singleton()->get_current_tab();
20382050
_update_resource_paths_after_move(file_renames, uids);
20392051
_update_dependencies_after_move(file_renames, file_owners);

0 commit comments

Comments
 (0)