mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
Check if block_extract is false
This commit is contained in:
parent
6965774c69
commit
ae77642e94
69
content.c
69
content.c
@ -392,48 +392,49 @@ static bool load_content(const struct retro_subsystem_info *special,
|
|||||||
RARCH_LOG("Content loading skipped. Implementation will"
|
RARCH_LOG("Content loading skipped. Implementation will"
|
||||||
" load it on its own.\n");
|
" load it on its own.\n");
|
||||||
|
|
||||||
#if 0
|
|
||||||
#ifdef HAVE_COMPRESSION
|
#ifdef HAVE_COMPRESSION
|
||||||
if (need_fullpath && path_contains_compressed_file(path))
|
if (!g_extern.system.info.block_extract)
|
||||||
{
|
{
|
||||||
char new_path[PATH_MAX], new_basedir[PATH_MAX];
|
if (need_fullpath && path_contains_compressed_file(path))
|
||||||
union string_list_elem_attr attributes;
|
|
||||||
|
|
||||||
RARCH_LOG("Compressed file in case of need_fullpath."
|
|
||||||
"Now extracting to temporary directory.\n");
|
|
||||||
|
|
||||||
strlcpy(new_basedir, g_settings.extraction_directory,
|
|
||||||
sizeof(new_basedir));
|
|
||||||
|
|
||||||
if ((!strcmp(new_basedir, "")) ||
|
|
||||||
!path_is_directory(new_basedir))
|
|
||||||
{
|
{
|
||||||
RARCH_WARN("Tried extracting to extraction directory, but "
|
char new_path[PATH_MAX], new_basedir[PATH_MAX];
|
||||||
"extraction directory was not set or found. "
|
union string_list_elem_attr attributes;
|
||||||
"Setting extraction directory to directory "
|
|
||||||
"derived by basename...\n");
|
RARCH_LOG("Compressed file in case of need_fullpath."
|
||||||
fill_pathname_basedir(new_basedir, path,
|
"Now extracting to temporary directory.\n");
|
||||||
|
|
||||||
|
strlcpy(new_basedir, g_settings.extraction_directory,
|
||||||
sizeof(new_basedir));
|
sizeof(new_basedir));
|
||||||
}
|
|
||||||
|
|
||||||
attributes.i = 0;
|
if ((!strcmp(new_basedir, "")) ||
|
||||||
fill_pathname_join(new_path, new_basedir,
|
!path_is_directory(new_basedir))
|
||||||
path_basename(path), sizeof(new_path));
|
{
|
||||||
read_compressed_file(path,NULL,new_path);
|
RARCH_WARN("Tried extracting to extraction directory, but "
|
||||||
string_list_append(additional_path_allocs,new_path, attributes);
|
"extraction directory was not set or found. "
|
||||||
info[i].path =
|
"Setting extraction directory to directory "
|
||||||
|
"derived by basename...\n");
|
||||||
|
fill_pathname_basedir(new_basedir, path,
|
||||||
|
sizeof(new_basedir));
|
||||||
|
}
|
||||||
|
|
||||||
|
attributes.i = 0;
|
||||||
|
fill_pathname_join(new_path, new_basedir,
|
||||||
|
path_basename(path), sizeof(new_path));
|
||||||
|
read_compressed_file(path,NULL,new_path);
|
||||||
|
string_list_append(additional_path_allocs,new_path, attributes);
|
||||||
|
info[i].path =
|
||||||
additional_path_allocs->elems
|
additional_path_allocs->elems
|
||||||
[additional_path_allocs->size -1 ].data;
|
[additional_path_allocs->size -1 ].data;
|
||||||
|
|
||||||
/* g_extern.temporary_content is initialized in init_content_file
|
/* g_extern.temporary_content is initialized in init_content_file
|
||||||
* The following part takes care of cleanup of the unzipped files
|
* The following part takes care of cleanup of the unzipped files
|
||||||
* after exit.
|
* after exit.
|
||||||
*/
|
*/
|
||||||
rarch_assert(g_extern.temporary_content != NULL);
|
rarch_assert(g_extern.temporary_content != NULL);
|
||||||
string_list_append(g_extern.temporary_content,
|
string_list_append(g_extern.temporary_content,
|
||||||
new_path, attributes);
|
new_path, attributes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user