mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-26 04:36:01 +00:00
file_ops.c - cleanups
This commit is contained in:
parent
b46b880c32
commit
42e54ea10a
51
file_ops.c
51
file_ops.c
@ -221,14 +221,24 @@ static int read_7zip_file(
|
|||||||
/* Error handling */
|
/* Error handling */
|
||||||
if (!file_found)
|
if (!file_found)
|
||||||
RARCH_ERR("File %s not found in %s\n", relative_path, archive_path);
|
RARCH_ERR("File %s not found in %s\n", relative_path, archive_path);
|
||||||
else if (res == SZ_ERROR_UNSUPPORTED)
|
|
||||||
RARCH_ERR("7Zip decoder doesn't support this archive\n");
|
|
||||||
else if (res == SZ_ERROR_MEM)
|
|
||||||
RARCH_ERR("7Zip decoder could not allocate memory\n");
|
|
||||||
else if (res == SZ_ERROR_CRC)
|
|
||||||
RARCH_ERR("7Zip decoder encountered a CRC error in the archive\n");
|
|
||||||
else
|
else
|
||||||
RARCH_ERR("\nUnspecified error in 7-ZIP archive, error number was: #%d\n", res);
|
{
|
||||||
|
switch (res)
|
||||||
|
{
|
||||||
|
case SZ_ERROR_UNSUPPORTED:
|
||||||
|
RARCH_ERR("7Zip decoder doesn't support this archive.\n");
|
||||||
|
break;
|
||||||
|
case SZ_ERROR_MEM:
|
||||||
|
RARCH_ERR("7Zip decoder could not allocate memory\n");
|
||||||
|
break;
|
||||||
|
case SZ_ERROR_CRC:
|
||||||
|
RARCH_ERR("7Zip decoder encountered a CRC error in the archive\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
RARCH_ERR("\nUnspecified error in 7-ZIP archive, error number was: #%d\n", res);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
outsize = -1;
|
outsize = -1;
|
||||||
}
|
}
|
||||||
@ -347,16 +357,23 @@ static struct string_list *compressed_7zip_file_list_new(
|
|||||||
if (res != SZ_OK)
|
if (res != SZ_OK)
|
||||||
{
|
{
|
||||||
/* Error handling */
|
/* Error handling */
|
||||||
if (res == SZ_ERROR_UNSUPPORTED)
|
switch (res)
|
||||||
RARCH_ERR("7Zip decoder doesn't support this archive. \n");
|
{
|
||||||
else if (res == SZ_ERROR_MEM)
|
case SZ_ERROR_UNSUPPORTED:
|
||||||
RARCH_ERR("7Zip decoder could not allocate memory. \n");
|
RARCH_ERR("7Zip decoder doesn't support this archive. \n");
|
||||||
else if (res == SZ_ERROR_CRC)
|
break;
|
||||||
RARCH_ERR("7Zip decoder encountered a CRC error in the archive. \n");
|
case SZ_ERROR_MEM:
|
||||||
else
|
RARCH_ERR("7Zip decoder could not allocate memory. \n");
|
||||||
RARCH_ERR(
|
break;
|
||||||
"\nUnspecified error in 7-ZIP archive, error number was: #%d. \n",
|
case SZ_ERROR_CRC:
|
||||||
res);
|
RARCH_ERR("7Zip decoder encountered a CRC error in the archive. \n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
RARCH_ERR(
|
||||||
|
"Unspecified error in 7-ZIP archive, error number was: #%d. \n",
|
||||||
|
res);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
RARCH_ERR("Failed to open compressed_file: \"%s\"\n", path);
|
RARCH_ERR("Failed to open compressed_file: \"%s\"\n", path);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user