diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-12-16 17:50:05 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-12-16 17:50:05 +0100 |
commit | df9be54b2fbe93fb7325049b063b0a08c76cd868 (patch) | |
tree | ee2b5333eb95d89c1ec9a80232dfa03e7811be98 /core/io/resource_format_binary.cpp | |
parent | 9c425c592fc626c7fb48d0f73ee2b2cee45c668b (diff) | |
parent | 397f0b31e4bd255e9f707a1d5d9ce2ac0b2ef409 (diff) | |
download | redot-engine-df9be54b2fbe93fb7325049b063b0a08c76cd868.tar.gz |
Merge pull request #86177 from KoBeWi/depren_never_forgets
Fix file disappearing when renaming dependencies
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r-- | core/io/resource_format_binary.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 2a33f723dc..20c494516b 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -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; } |