Removes tabs, added full path of downloaded file.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8467 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
af2476c6e0
commit
577d837588
@ -666,7 +666,8 @@ bool NetworkHttp::downloadFileInternal(const std::string &url,
|
|||||||
bool is_asynchron)
|
bool is_asynchron)
|
||||||
{
|
{
|
||||||
if(UserConfigParams::m_verbosity>=3)
|
if(UserConfigParams::m_verbosity>=3)
|
||||||
printf("[addons] Downloading %s\n", url.c_str());
|
printf("[addons] Downloading '%s' as '%s').\n", url.c_str(),
|
||||||
|
file_manager->getAddonsFile(save_filename).c_str());
|
||||||
CURL *session = curl_easy_init();
|
CURL *session = curl_easy_init();
|
||||||
std::string full_url = url;
|
std::string full_url = url;
|
||||||
if(url.substr(0, 5)!="http:" && url.substr(0, 4)!="ftp:")
|
if(url.substr(0, 5)!="http:" && url.substr(0, 4)!="ftp:")
|
||||||
@ -677,6 +678,7 @@ bool NetworkHttp::downloadFileInternal(const std::string &url,
|
|||||||
std::string uagent = (std::string)"SuperTuxKart/" + STK_VERSION;
|
std::string uagent = (std::string)"SuperTuxKart/" + STK_VERSION;
|
||||||
curl_easy_setopt(session, CURLOPT_USERAGENT, uagent.c_str());
|
curl_easy_setopt(session, CURLOPT_USERAGENT, uagent.c_str());
|
||||||
curl_easy_setopt(session, CURLOPT_FOLLOWLOCATION, 1);
|
curl_easy_setopt(session, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
|
||||||
FILE * fout = fopen(file_manager->getAddonsFile(save_filename).c_str(),
|
FILE * fout = fopen(file_manager->getAddonsFile(save_filename).c_str(),
|
||||||
"wb");
|
"wb");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user