mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Fixes the setting of binary file download config for httpObject
This commit is contained in:
parent
f92c1706c6
commit
e4cca8d3f0
1 changed files with 2 additions and 1 deletions
|
|
@ -270,7 +270,7 @@ void HTTPObject::processLines()
|
||||||
//Write to the output file
|
//Write to the output file
|
||||||
FileStream *stream = new FileStream();
|
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.");
|
Con::errorf("Could not download %s: error opening stream.");
|
||||||
onDownloadFailed(path);
|
onDownloadFailed(path);
|
||||||
return;
|
return;
|
||||||
|
|
@ -413,6 +413,7 @@ void HTTPObject::setDownloadPath(const std::string &path)
|
||||||
char expanded[0x100];
|
char expanded[0x100];
|
||||||
Con::expandScriptFilename(expanded, 0x100, path.c_str());
|
Con::expandScriptFilename(expanded, 0x100, path.c_str());
|
||||||
mDownloadPath = std::string(expanded);
|
mDownloadPath = std::string(expanded);
|
||||||
|
mDownload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTTPObject::addHeader(const std::string &name, const std::string &value)
|
void HTTPObject::addHeader(const std::string &name, const std::string &value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue