mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 02:00:41 +00:00
Report error when core download failed (#14824)
Fix curly bracket opening
This commit is contained in:
parent
af9f946019
commit
ec2805a562
@ -77,6 +77,7 @@ enum core_updater_download_status
|
||||
CORE_UPDATER_DOWNLOAD_START_TRANSFER,
|
||||
CORE_UPDATER_DOWNLOAD_WAIT_TRANSFER,
|
||||
CORE_UPDATER_DOWNLOAD_WAIT_DECOMPRESS,
|
||||
CORE_UPDATER_DOWNLOAD_ERROR,
|
||||
CORE_UPDATER_DOWNLOAD_END
|
||||
};
|
||||
|
||||
@ -633,9 +634,11 @@ void cb_http_task_core_updater_download(
|
||||
finish:
|
||||
/* Log any error messages */
|
||||
if (!string_is_empty(err))
|
||||
{
|
||||
RARCH_ERR("[core updater] Download of '%s' failed: %s\n",
|
||||
(transf ? transf->path: "unknown"), err);
|
||||
|
||||
download_handle->status = CORE_UPDATER_DOWNLOAD_ERROR;
|
||||
}
|
||||
if (transf)
|
||||
free(transf);
|
||||
|
||||
@ -923,6 +926,21 @@ static void task_core_updater_download_handler(retro_task_t *task)
|
||||
download_handle->status = CORE_UPDATER_DOWNLOAD_END;
|
||||
}
|
||||
break;
|
||||
case CORE_UPDATER_DOWNLOAD_ERROR:
|
||||
{
|
||||
char task_title[PATH_MAX_LENGTH];
|
||||
|
||||
/* Set final task title */
|
||||
task_free_title(task);
|
||||
|
||||
strlcpy(task_title, msg_hash_to_str(MSG_CORE_INSTALL_FAILED), sizeof(task_title));
|
||||
strlcat(task_title, download_handle->display_name, sizeof(task_title));
|
||||
|
||||
task_set_title(task, strdup(task_title));
|
||||
task_set_progress(task, 100);
|
||||
goto task_finished;
|
||||
}
|
||||
break;
|
||||
case CORE_UPDATER_DOWNLOAD_END:
|
||||
{
|
||||
char task_title[PATH_MAX_LENGTH];
|
||||
|
Loading…
Reference in New Issue
Block a user