You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +00:00
Narrow FileAccess scope to prevent deadlocks.
This commit is contained in:
@@ -514,7 +514,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
|
||||
}
|
||||
|
||||
f->store_buffer(data.ptr(), data.size());
|
||||
|
||||
f.unref(); // close file.
|
||||
#ifndef WINDOWS_ENABLED
|
||||
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
|
||||
#endif
|
||||
@@ -728,6 +728,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
|
||||
Ref<FileAccess> f = FileAccess::open(to_write, FileAccess::WRITE);
|
||||
if (f.is_valid()) {
|
||||
f->store_buffer(data.ptr(), data.size());
|
||||
f.unref(); // close file.
|
||||
#ifndef WINDOWS_ENABLED
|
||||
FileAccess::set_unix_permissions(to_write, (info.external_fa >> 16) & 0x01FF);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user