autodl crash if no writing permissions fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7569 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2013-10-05 12:24:22 +00:00
parent a39bc77abc
commit 98cc2d91ac
+6
View File
@@ -1047,6 +1047,12 @@ double dlpackage(package *pck)
string req, pckname = "";
sprintf(req, "%s/%s%s", pck->source->addr, strreplace(pckname, pck->name, " ", "%20"), (pck->type==PCK_MAP || pck->type==PCK_MAPMODEL || pck->type==PCK_SKYBOX) ? ".zip" : "");
conoutf(_("downloading %s from %s ..."), pck->name, pck->source->addr);
if(!outfile)
{
pck->pending = false;
conoutf("\f3failed to write temporary file");
return 0;
}
int result, httpresult = 0;
double dlsize;