Fix servers trying to redirect players to downloading directory-packages as a single file (which will always fail).

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5434 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-03-15 04:01:46 +00:00
parent b04b7b2b0a
commit dc999091aa

View file

@ -1405,7 +1405,7 @@ char *FS_GetPackageDownloadFilename(flocation_t *loc)
break;
}
if (sp && strchr(sp->purepath, '/')) //never allow any packages that are directly sitting in the basedir.
if (sp && strchr(sp->purepath, '/') && sp->handle->GeneratePureCRC) //never allow any packages that are directly sitting in the basedir.
return sp->purepath;
return NULL;
}
@ -5817,12 +5817,15 @@ void FS_CreateBasedir(const char *path)
{
vfsfile_t *f;
com_installer = false;
Q_strncpyz (com_gamepath, path, sizeof(com_gamepath));
COM_CreatePath(com_gamepath);
if (path)
{
Q_strncpyz (com_gamepath, path, sizeof(com_gamepath));
COM_CreatePath(com_gamepath);
}
fs_manifest->security = MANIFEST_SECURITY_INSTALLER;
FS_ChangeGame(fs_manifest, true, false);
if (host_parms.manifest)
if (path && host_parms.manifest)
{
f = FS_OpenVFS("default.fmf", "wb", FS_ROOT);
if (f)