mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Narrow FileAccess scope to prevent deadlocks.
This commit is contained in:
parent
5974e1432e
commit
4bf99f4af2
29 changed files with 511 additions and 459 deletions
|
|
@ -1142,6 +1142,10 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b
|
|||
|
||||
Error err = export_project_files(p_preset, p_debug, _save_pack_file, &pd, _add_shared_object);
|
||||
|
||||
// Close temp file.
|
||||
pd.f.unref();
|
||||
ftmp.unref();
|
||||
|
||||
if (err != OK) {
|
||||
DirAccess::remove_file_or_error(tmppath);
|
||||
ERR_PRINT("Failed to export project files");
|
||||
|
|
@ -1301,6 +1305,8 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b
|
|||
f->store_buffer(buf, got);
|
||||
}
|
||||
|
||||
ftmp.unref(); // Close temp file.
|
||||
|
||||
if (p_embed) {
|
||||
// Ensure embedded data ends at a 64-bit multiple
|
||||
uint64_t embed_end = f->get_position() - embed_pos + 12;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue