From 3a67aefee2d326ceabec044c1944c5b1ec75c5a3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 13 Aug 2024 17:25:25 +0300 Subject: [PATCH] filesystem: check rodir too when checking falldir existence too, just in case --- filesystem/filesystem.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/filesystem/filesystem.c b/filesystem/filesystem.c index 60695f16..dc63c562 100644 --- a/filesystem/filesystem.c +++ b/filesystem/filesystem.c @@ -912,9 +912,18 @@ static void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, cons } // make sure what gamedir is really exist + // a1ba: why we are doing this??? Q_snprintf( token, sizeof( token ), "%s/%s", fs_rootdir, GameInfo->falldir ); if( !FS_SysFolderExists( token )) - GameInfo->falldir[0] = '\0'; + { + if( COM_CheckStringEmpty( fs_rodir )) + { + Q_snprintf( token, sizeof( token ), "%s/%s", fs_rodir, GameInfo->falldir ); + if( !FS_SysFolderExists( token )) + GameInfo->falldir[0] = 0; + } + else GameInfo->falldir[0] = 0; + } } /*