2
0
Эх сурвалжийг харах

Create the temporary PCK export directory if it doesn't exist

This closes #45560.

(cherry picked from commit 42ef79b8263654e39dd94fd63ba43ae99709c750)
Hugo Locurcio 4 жил өмнө
parent
commit
238b8ded72

+ 4 - 0
editor/editor_export.cpp

@@ -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 + "'.");