mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-16 15:27:41 +00:00
Cleanups
This commit is contained in:
parent
3dc9ca7e0b
commit
504bea51e0
@ -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;
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user