mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add error checks for DirAccess creation.
This commit is contained in:
parent
43b9e89a07
commit
3f4513d4de
10 changed files with 26 additions and 0 deletions
|
@ -2635,6 +2635,8 @@ void EditorExportPlatformAndroid::_clear_assets_directory() {
|
|||
if (da_res->dir_exists(APK_ASSETS_DIRECTORY)) {
|
||||
print_verbose("Clearing APK assets directory...");
|
||||
Ref<DirAccess> da_assets = DirAccess::open(APK_ASSETS_DIRECTORY);
|
||||
ERR_FAIL_COND(da_assets.is_null());
|
||||
|
||||
da_assets->erase_contents_recursive();
|
||||
da_res->remove(APK_ASSETS_DIRECTORY);
|
||||
}
|
||||
|
@ -2643,6 +2645,8 @@ void EditorExportPlatformAndroid::_clear_assets_directory() {
|
|||
if (da_res->dir_exists(AAB_ASSETS_DIRECTORY)) {
|
||||
print_verbose("Clearing AAB assets directory...");
|
||||
Ref<DirAccess> da_assets = DirAccess::open(AAB_ASSETS_DIRECTORY);
|
||||
ERR_FAIL_COND(da_assets.is_null());
|
||||
|
||||
da_assets->erase_contents_recursive();
|
||||
da_res->remove(AAB_ASSETS_DIRECTORY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue