From e4cca8d3f096941f6c23dd42f60f8c6aead9d08c Mon Sep 17 00:00:00 2001 From: Areloch Date: Sun, 16 Oct 2022 11:39:56 -0500 Subject: [PATCH] Fixes the setting of binary file download config for httpObject --- Engine/source/app/net/httpObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/source/app/net/httpObject.cpp b/Engine/source/app/net/httpObject.cpp index 4992bb234..986cb5471 100644 --- a/Engine/source/app/net/httpObject.cpp +++ b/Engine/source/app/net/httpObject.cpp @@ -270,7 +270,7 @@ void HTTPObject::processLines() //Write to the output file FileStream *stream = new FileStream(); - if (!stream->open(path, Torque::FS::File::Read)) { + if (!stream->open(path, Torque::FS::File::Write)) { Con::errorf("Could not download %s: error opening stream."); onDownloadFailed(path); return; @@ -413,6 +413,7 @@ void HTTPObject::setDownloadPath(const std::string &path) char expanded[0x100]; Con::expandScriptFilename(expanded, 0x100, path.c_str()); mDownloadPath = std::string(expanded); + mDownload = true; } void HTTPObject::addHeader(const std::string &name, const std::string &value)