mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-06 12:14:15 +00:00
filesystem: fix FS_GetDiskPath, it was broken since implementing caseinsensitive emulation, oops
Anyway, FS_GetFullDiskPath is a proper safe version that lacks this bug
This commit is contained in:
parent
0f643f1f87
commit
d0127e5e14
@ -2417,16 +2417,19 @@ return NULL for file in pack
|
|||||||
*/
|
*/
|
||||||
const char *FS_GetDiskPath( const char *name, qboolean gamedironly )
|
const char *FS_GetDiskPath( const char *name, qboolean gamedironly )
|
||||||
{
|
{
|
||||||
static char temp[MAX_SYSPATH];
|
static char diskpath[MAX_SYSPATH];
|
||||||
|
char fullpath[MAX_SYSPATH];
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
|
|
||||||
search = FS_FindFile( name, NULL, temp, sizeof( temp ), gamedironly );
|
search = FS_FindFile( name, NULL, fullpath, sizeof( fullpath ), gamedironly );
|
||||||
|
|
||||||
if( search )
|
if( search )
|
||||||
{
|
{
|
||||||
if( search->type != SEARCHPATH_PLAIN ) // file in pack or wad
|
if( search->type != SEARCHPATH_PLAIN ) // file in pack or wad
|
||||||
return NULL;
|
return NULL;
|
||||||
return temp;
|
|
||||||
|
Q_snprintf( diskpath, sizeof( diskpath ), "%s/%s", search->filename, fullpath );
|
||||||
|
return diskpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user