mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Qt: remove partially downloaded files on failure
This commit is contained in:
parent
49e5fcd0cc
commit
1d6a69d198
@ -124,6 +124,7 @@ void MainWindow::onThumbnailDownloadFinished()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*emit showErrorMessageDeferred(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR)) + ": HTTP Code " + QString::number(code));*/
|
/*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);
|
RARCH_ERR("[Qt]: Thumbnail download failed with HTTP status code: %d\n", code);
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ void MainWindow::onRetroArchUpdateDownloadFinished()
|
|||||||
QByteArray errorArray = reply->errorString().toUtf8();
|
QByteArray errorArray = reply->errorString().toUtf8();
|
||||||
const char *errorData = errorArray.constData();
|
const char *errorData = errorArray.constData();
|
||||||
|
|
||||||
|
m_updateFile.remove();
|
||||||
|
|
||||||
RARCH_ERR("[Qt]: RetroArch update ended prematurely: %s\n", errorData);
|
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);
|
emit showErrorMessageDeferred(QString(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR)) + ": Code " + QString::number(code) + ": " + errorData);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user