summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-03 16:57:26 +0200
committerGitHub <noreply@github.com>2022-08-03 16:57:26 +0200
commit2d372d9e106286ab281f26f85fdf0f24594469c8 (patch)
treeffe2547d1ac794add030eb3d698c1a4fa7555adb /core/io
parent38cf9b4b8e916b8d8e635696e966217dba151d51 (diff)
parentb32b570d7a64dfdce02605557532754a8629e68a (diff)
Merge pull request #56442 from PucklaMotzer09/remap_files_moved
Diffstat (limited to 'core/io')
-rw-r--r--core/io/resource_loader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index fc4177004b..3e595557f9 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -819,6 +819,12 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
if (r_translation_remapped) {
*r_translation_remapped = true;
}
+
+ // Fallback to p_path if new_path does not exist.
+ if (!FileAccess::exists(new_path)) {
+ WARN_PRINT(vformat("Translation remap '%s' does not exist. Falling back to '%s'.", new_path, p_path));
+ new_path = p_path;
+ }
}
if (path_remaps.has(new_path)) {