summaryrefslogtreecommitdiff
path: root/editor/editor_export.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-04-12 10:39:54 +0200
committerGitHub <noreply@github.com>2022-04-12 10:39:54 +0200
commitf586e06f7b7b1066bc234198a6c11123927cb87c (patch)
treeea9684d5549f9fc9439ffaf438373f5ca5608a9a /editor/editor_export.cpp
parent2f7edae2b3064714b2e0fe8302366abc658955ce (diff)
parent4bf99f4af2c4918883c4382ead7de275fae21eea (diff)
Merge pull request #60166 from bruvzg/narrow_file_access
Diffstat (limited to 'editor/editor_export.cpp')
-rw-r--r--editor/editor_export.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 40b850cace..a822c5fb5f 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -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;