You've already forked godot
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:
@@ -1454,8 +1454,10 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
|
||||
fw.unref();
|
||||
|
||||
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (da->exists(p_path + ".depren")) {
|
||||
da->remove(p_path);
|
||||
da->rename(p_path + ".depren", p_path);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1791,8 +1791,8 @@ Error ResourceFormatLoaderText::rename_dependencies(const String &p_path, const
|
||||
err = loader.rename_dependencies(f, p_path, p_map);
|
||||
}
|
||||
|
||||
if (err == OK) {
|
||||
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (err == OK && da->file_exists(p_path + ".depren")) {
|
||||
da->remove(p_path);
|
||||
da->rename(p_path + ".depren", p_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user