mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-30 16:14:11 +00:00
(360) Have to drop the slashes for this to work on WIN32-style
consoles
This commit is contained in:
parent
88df35578d
commit
685a0d581f
@ -48,12 +48,6 @@ static int rarch_zlib_extract_file(unzFile uf,
|
|||||||
char filename_inzip[PATH_MAX];
|
char filename_inzip[PATH_MAX];
|
||||||
bool is_dir = false;
|
bool is_dir = false;
|
||||||
FILE *file_out = NULL;
|
FILE *file_out = NULL;
|
||||||
char slash;
|
|
||||||
#if defined(_WIN32)
|
|
||||||
slash = '\\';
|
|
||||||
#else
|
|
||||||
slash = '/';
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unz_file_info file_info;
|
unz_file_info file_info;
|
||||||
int ret = unzGetCurrentFileInfo(uf,
|
int ret = unzGetCurrentFileInfo(uf,
|
||||||
@ -78,7 +72,7 @@ static int rarch_zlib_extract_file(unzFile uf,
|
|||||||
{
|
{
|
||||||
case ZIP_EXTRACT_TO_CURRENT_DIR:
|
case ZIP_EXTRACT_TO_CURRENT_DIR:
|
||||||
case ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE:
|
case ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE:
|
||||||
snprintf(write_filename, write_filename_size, "%s%c%s", current_dir, slash, filename_inzip);
|
snprintf(write_filename, write_filename_size, "%s%s", current_dir, filename_inzip);
|
||||||
break;
|
break;
|
||||||
#if defined(HAVE_HDD_CACHE_PARTITION) && defined(RARCH_CONSOLE)
|
#if defined(HAVE_HDD_CACHE_PARTITION) && defined(RARCH_CONSOLE)
|
||||||
case ZIP_EXTRACT_TO_CACHE_DIR:
|
case ZIP_EXTRACT_TO_CACHE_DIR:
|
||||||
@ -86,7 +80,12 @@ static int rarch_zlib_extract_file(unzFile uf,
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
char slash;
|
||||||
|
#if defined(_WIN32)
|
||||||
|
slash = '\\';
|
||||||
|
#else
|
||||||
|
slash = '/';
|
||||||
|
#endif
|
||||||
if (filename_inzip[strlen(filename_inzip) - 1] == slash)
|
if (filename_inzip[strlen(filename_inzip) - 1] == slash)
|
||||||
is_dir = true;
|
is_dir = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user