From: havoc Date: Tue, 3 May 2011 18:33:50 +0000 (+0000) Subject: fix screenshot prefix updates on gamedir change X-Git-Tag: xonotic-v0.5.0~226 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4a220ac6354edc943cd10c4d1b3105c1584e8d84;p=xonotic%2Fdarkplaces.git fix screenshot prefix updates on gamedir change git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11099 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=b1ff17a02ba9bea34175b1fe914539aa08148697 --- diff --git a/fs.c b/fs.c index b5ffaf2a..80916b0f 100644 --- a/fs.c +++ b/fs.c @@ -1364,11 +1364,14 @@ void FS_Rescan (void) // gamedirname1 (typically id1) FS_AddGameHierarchy (gamedirname1); // update the com_modname (used for server info) - strlcpy(com_modname, gamedirname1, sizeof(com_modname)); + if (gamedirname2 && gamedirname2[0]) + strlcpy(com_modname, gamedirname2, sizeof(com_modname)); + else + strlcpy(com_modname, gamedirname1, sizeof(com_modname)); // add the game-specific path, if any // (only used for mission packs and the like, which should set fs_modified) - if (gamedirname2) + if (gamedirname2 && gamedirname2[0]) { fs_modified = true; FS_AddGameHierarchy (gamedirname2);