Create the temporary PCK export directory if it doesn't exist
This closes #45560.
(cherry picked from commit 42ef79b826
)
This commit is contained in:
parent
7ce1789597
commit
238b8ded72
1 changed files with 4 additions and 0 deletions
|
@ -942,6 +942,10 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, c
|
|||
|
||||
EditorProgress ep("savepack", TTR("Packing"), 102, true);
|
||||
|
||||
// Create the temporary export directory if it doesn't exist.
|
||||
DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
da->make_dir_recursive(EditorSettings::get_singleton()->get_cache_dir());
|
||||
|
||||
String tmppath = EditorSettings::get_singleton()->get_cache_dir().plus_file("packtmp");
|
||||
FileAccess *ftmp = FileAccess::open(tmppath, FileAccess::WRITE);
|
||||
ERR_FAIL_COND_V_MSG(!ftmp, ERR_CANT_CREATE, "Cannot create file '" + tmppath + "'.");
|
||||
|
|
Loading…
Reference in a new issue