mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Merge pull request #82347 from SaracenOne/dir_access_checks
Add error checks for DirAccess creation
This commit is contained in:
@@ -3051,6 +3051,8 @@ Error GLTFDocument::_serialize_images(Ref<GLTFState> p_state) {
|
||||
String relative_texture_dir = "textures";
|
||||
String full_texture_dir = p_state->base_path.path_join(relative_texture_dir);
|
||||
Ref<DirAccess> da = DirAccess::open(p_state->base_path);
|
||||
ERR_FAIL_COND_V(da.is_null(), FAILED);
|
||||
|
||||
if (!da->dir_exists(full_texture_dir)) {
|
||||
da->make_dir(full_texture_dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user