Merge pull request #94691 from akien-mga/android-workaround-94416

Android Editor: Disable file reimport when .import changes
This commit is contained in:
Rémi Verschelde 2024-07-24 13:03:33 +02:00
commit f724ee530a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 0 deletions

View File

@ -722,12 +722,16 @@ bool EditorFileSystem::_update_scan_actions() {
String full_path = ia.dir->get_file_path(idx); String full_path = ia.dir->get_file_path(idx);
bool need_reimport = _test_for_reimport(full_path, false); bool need_reimport = _test_for_reimport(full_path, false);
// Workaround GH-94416 for the Android editor for now.
// `import_mt` seems to always be 0 and force a reimport on any fs scan.
#ifndef ANDROID_ENABLED
if (!need_reimport && FileAccess::exists(full_path + ".import")) { if (!need_reimport && FileAccess::exists(full_path + ".import")) {
uint64_t import_mt = ia.dir->get_file_import_modified_time(idx); uint64_t import_mt = ia.dir->get_file_import_modified_time(idx);
if (import_mt != FileAccess::get_modified_time(full_path + ".import")) { if (import_mt != FileAccess::get_modified_time(full_path + ".import")) {
need_reimport = true; need_reimport = true;
} }
} }
#endif
if (need_reimport) { if (need_reimport) {
//must reimport //must reimport