summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index e81f71e0e0..6d1e1eaaa0 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -2154,6 +2154,9 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin
}
}
+ // Update cpos, newly created files could've changed the index of the reimported p_file.
+ _find_file(p_file, &fs, cpos);
+
//update modified times, to avoid reimport
fs->files[cpos]->modified_time = FileAccess::get_modified_time(p_file);
fs->files[cpos]->import_modified_time = FileAccess::get_modified_time(p_file + ".import");