From dc999091aab293e0765fe59c671911e64aa98f27 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 15 Mar 2019 04:01:46 +0000 Subject: [PATCH] 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 --- engine/common/fs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/common/fs.c b/engine/common/fs.c index b2a5bb50..c74d101e 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -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)