Fix error reporting when opening the download file fails

This commit is contained in:
Martin Natano
2022-05-01 10:42:28 +02:00
parent 07e8abf380
commit 6cd4ac88c3
+1 -1
View File
@@ -151,7 +151,7 @@ HttpRequestFuturePtr NetworkManager::HttpRequest(const HttpRequestArgs& args)
req->onProgressCallback = args.onProgress;
client.performRequest(req, [args, downloadFile, downloadFilename](const ix::HttpResponsePtr& response) {
if (downloadFile->IsOpen())
if (!args.downloadFile.empty())
{
RString error = downloadFile->GetError();
downloadFile->Close();