mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
(iOS) Build fix and use zlib_perform_mode in apple/iOS/browser.m
This commit is contained in:
parent
9281595024
commit
ff24ddcd1d
@ -22,7 +22,6 @@
|
||||
#include "../../content.h"
|
||||
#include "../../general.h"
|
||||
#include <file/dir_list.h>
|
||||
#include "../../file_ops.h"
|
||||
#include <file/file_path.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
@ -44,23 +43,28 @@ static int zlib_extract_callback(const char *name, const char *valid_exts,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ignore directories
|
||||
/* Ignore directories */
|
||||
if (name[strlen(name) - 1] == '/')
|
||||
return 1;
|
||||
|
||||
fill_pathname_join(path, (const char*)userdata, name, sizeof(path));
|
||||
|
||||
switch (cmode)
|
||||
if (!zlib_perform_mode(path, valid_exts,
|
||||
cdata, cmode, csize, size, crc32, userdata))
|
||||
{
|
||||
case 0: // Uncompressed
|
||||
write_file(path, cdata, size);
|
||||
break;
|
||||
case 8: // Deflate
|
||||
zlib_inflate_data_to_file(path, valid_exts, cdata, csize, size, crc32);
|
||||
break;
|
||||
if (cmode == 0)
|
||||
{
|
||||
RARCH_ERR("Failed to write file: %s.\n", path);
|
||||
return 0;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
error:
|
||||
RARCH_ERR("Failed to deflate to: %s.\n", path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void unzip_file(const char* path, const char* output_directory)
|
||||
|
Loading…
x
Reference in New Issue
Block a user