Qt: remove partially downloaded files on failure

This commit is contained in:
Brad Parker 2018-08-26 12:04:18 -04:00
parent 49e5fcd0cc
commit 1d6a69d198
2 changed files with 3 additions and 0 deletions

View File

@ -124,6 +124,7 @@ void MainWindow::onThumbnailDownloadFinished()
else
{
/*emit showErrorMessageDeferred(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR)) + ": HTTP Code " + QString::number(code));*/
m_thumbnailDownloadFile.remove();
RARCH_ERR("[Qt]: Thumbnail download failed with HTTP status code: %d\n", code);

View File

@ -171,6 +171,8 @@ void MainWindow::onRetroArchUpdateDownloadFinished()
QByteArray errorArray = reply->errorString().toUtf8();
const char *errorData = errorArray.constData();
m_updateFile.remove();
RARCH_ERR("[Qt]: RetroArch update ended prematurely: %s\n", errorData);
emit showErrorMessageDeferred(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR)) + ": Code " + QString::number(code) + ": " + errorData);
}