diff --git a/android/phoenix/jni/apk-extract/apk-extract.c b/android/phoenix/jni/apk-extract/apk-extract.c index ffa0439f12..7ff4b7e11b 100644 --- a/android/phoenix/jni/apk-extract/apk-extract.c +++ b/android/phoenix/jni/apk-extract/apk-extract.c @@ -42,23 +42,13 @@ static int zlib_cb(const char *name, const char *valid_exts, fill_pathname_basedir(path_dir, path, sizeof(path_dir)); if (!path_mkdir(path_dir)) - { - RARCH_ERR("Failed to create dir: %s.\n", path_dir); - return 0; - } + goto error; RARCH_LOG("Extracting %s -> %s ...\n", name, path); if (!zlib_perform_mode(path, valid_exts, cdata, cmode, csize, size, crc32, userdata)) - { - if (cmode == 0) - { - RARCH_ERR("Failed to write file: %s.\n", path); - return 0; - } goto error; - } return 1; diff --git a/tasks/task_http.c b/tasks/task_http.c index 88aa5ea303..267a7ad7f6 100644 --- a/tasks/task_http.c +++ b/tasks/task_http.c @@ -83,10 +83,7 @@ static int zlib_extract_core_callback(const char *name, const char *valid_exts, path_basedir(path); if (!path_mkdir(path)) - { - RARCH_ERR("Failed to create directory: %s.\n", path); - return 0; - } + goto error; /* Ignore directories. */ if (name[strlen(name) - 1] == '/' || name[strlen(name) - 1] == '\\') @@ -98,14 +95,8 @@ static int zlib_extract_core_callback(const char *name, const char *valid_exts, if (!zlib_perform_mode(path, valid_exts, cdata, cmode, csize, size, crc32, userdata)) - { - if (cmode == 0) - { - RARCH_ERR("Failed to write file: %s.\n", path); - return 0; - } goto error; - } + return 1; error: