Skip to content

Commit

Permalink
Prevent overriding file info of another file when reimport creates files
Browse files Browse the repository at this point in the history
  • Loading branch information
Listwon committed Dec 8, 2023
1 parent a311a4b commit aae48ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit aae48ac

Please sign in to comment.