remove zip requirement for archives downloaded from network, same for detecting cores for files when loading archive with core

This commit is contained in:
Brad Parker 2016-10-13 15:04:26 -04:00
parent 8e329a2072
commit fec6ed0964
2 changed files with 7 additions and 9 deletions

View File

@ -581,8 +581,8 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
core_info_tmp_path = path;
#ifdef HAVE_ZLIB
if (string_is_equal_noncase(path_get_extension(path), "zip"))
#ifdef HAVE_COMPRESSION
if (path_is_compressed_file(path))
list = file_archive_get_file_list(path, NULL);
core_info_tmp_list = list;
#endif
@ -599,7 +599,7 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
if (core_info_does_support_file(core, path))
continue;
#ifdef HAVE_ZLIB
#ifdef HAVE_COMPRESSION
if (core_info_does_support_any_file(core, list))
continue;
#endif

View File

@ -2276,10 +2276,8 @@ static void cb_generic_download(void *task_data,
fill_pathname_join(output_path, dir_path,
transf->path, sizeof(output_path));
#ifdef HAVE_ZLIB
file_ext = path_get_extension(output_path);
if (string_is_equal_noncase(file_ext, "zip"))
#ifdef HAVE_COMPRESSION
if (path_is_compressed_file(output_path))
{
if (task_check_decompress(output_path))
{
@ -2295,11 +2293,11 @@ static void cb_generic_download(void *task_data,
goto finish;
}
#ifdef HAVE_ZLIB
#ifdef HAVE_COMPRESSION
if (!settings->network.buildbot_auto_extract_archive)
goto finish;
if (string_is_equal_noncase(file_ext, "zip"))
if (path_is_compressed_file(output_path))
{
if (!task_push_decompress(output_path, dir_path,
NULL, NULL, NULL,