Browse Source

engine: filesystem: fix liblistgam converting to gameinfo when rodir was enabled

pull/2/head
Alibek Omarov 4 years ago
parent
commit
be1958473b
  1. 6
      engine/common/filesystem.c

6
engine/common/filesystem.c

@ -1821,7 +1821,7 @@ static qboolean FS_ParseLiblistGam( const char *filename, const char *gamedir, g
char *afile; char *afile;
if( !GameInfo ) return false; if( !GameInfo ) return false;
afile = (char *)FS_LoadFile( filename, NULL, false ); afile = (char *)FS_LoadDirectFile( filename, NULL );
if( !afile ) return false; if( !afile ) return false;
FS_InitGameInfo( GameInfo, gamedir ); FS_InitGameInfo( GameInfo, gamedir );
@ -1922,6 +1922,8 @@ static qboolean FS_ParseGameInfo( const char *gamedir, gameinfo_t *GameInfo )
string filepath_ro, liblist_ro; string filepath_ro, liblist_ro;
fs_offset_t roLibListTime, roGameInfoTime, rwGameInfoTime; fs_offset_t roLibListTime, roGameInfoTime, rwGameInfoTime;
FS_AllowDirectPaths( true );
Q_snprintf( filepath_ro, sizeof( filepath_ro ), "%s/%s/gameinfo.txt", host.rodir, gamedir ); Q_snprintf( filepath_ro, sizeof( filepath_ro ), "%s/%s/gameinfo.txt", host.rodir, gamedir );
Q_snprintf( liblist_ro, sizeof( liblist_ro ), "%s/%s/liblist.gam", host.rodir, gamedir ); Q_snprintf( liblist_ro, sizeof( liblist_ro ), "%s/%s/liblist.gam", host.rodir, gamedir );
@ -1949,6 +1951,8 @@ static qboolean FS_ParseGameInfo( const char *gamedir, gameinfo_t *GameInfo )
Mem_Free( afile_ro ); Mem_Free( afile_ro );
} }
} }
FS_AllowDirectPaths( false );
} }
// if user change liblist.gam update the gameinfo.txt // if user change liblist.gam update the gameinfo.txt

Loading…
Cancel
Save