1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Fix file disappearing when renaming dependencies

(cherry picked from commit 397f0b31e4)
This commit is contained in:
kobewi
2023-12-14 22:28:48 +01:00
committed by Yuri Sizov
parent 7c22d5444a
commit c285b726bb
2 changed files with 6 additions and 4 deletions

View File

@@ -1454,8 +1454,10 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
fw.unref();
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
da->remove(p_path);
da->rename(p_path + ".depren", p_path);
if (da->exists(p_path + ".depren")) {
da->remove(p_path);
da->rename(p_path + ".depren", p_path);
}
return OK;
}