From 98cc2d91acafd4c41cf45f875d54c57aa916091b Mon Sep 17 00:00:00 2001 From: Lucas GAUTHERON Date: Sat, 5 Oct 2013 12:24:22 +0000 Subject: [PATCH] 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 --- source/src/client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/src/client.cpp b/source/src/client.cpp index e0767dab..6039106b 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -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;