diff options
author | Tim Angus <tim@ngus.net> | 2009-10-26 00:10:07 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:05 +0000 |
commit | 0fed3b1c32d99560482ea162b197531439df76e5 (patch) | |
tree | dd5f74d3124715a538462aa474f9af294f79bbbd /src/client/cl_main.c | |
parent | af6fd4fa5aaa4dc7c59ae54ead20d5ef0fbcc946 (diff) |
* Merge ioq3-r1708
Diffstat (limited to 'src/client/cl_main.c')
-rw-r--r-- | src/client/cl_main.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 5246ccd8..08c7eb51 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -1941,12 +1941,26 @@ CL_NextDownload A download completed or failed ================= */ -void CL_NextDownload(void) { +void CL_NextDownload(void) +{ char *s; char *remoteName, *localName; qboolean useCURL = qfalse; int prompt; + // A download has finished, check whether this matches a referenced checksum + if(*clc.downloadName) + { + char *zippath = FS_BuildOSPath(Cvar_VariableString("fs_homepath"), clc.downloadName, ""); + zippath[strlen(zippath)-1] = '\0'; + + if(!FS_CompareZipChecksum(zippath)) + Com_Error(ERR_DROP, "Incorrect checksum for file: %s", clc.downloadName); + } + + *clc.downloadTempName = *clc.downloadName = 0; + Cvar_Set("cl_downloadName", ""); + // We are looking to start a download here if (*clc.downloadList) { @@ -2135,6 +2149,10 @@ void CL_InitDownloads(void) { Cvar_Set( "com_downloadPrompt", "0" ); if ( *clc.downloadList ) { cls.state = CA_CONNECTED; + + *clc.downloadTempName = *clc.downloadName = 0; + Cvar_Set( "cl_downloadName", "" ); + CL_NextDownload(); return; } |