filesystem: make fs_searchpaths completely private to the filesystem core

This commit is contained in:
Alibek Omarov
2023-06-08 22:30:45 +03:00
parent 0d6137ee40
commit 37e890f326
3 changed files with 30 additions and 17 deletions

View File

@@ -406,8 +406,6 @@ public:
bool FullPathToRelativePath( const char *path, char *out ) override
{
searchpath_t *sp;
if( !COM_CheckString( path ))
{
*out = 0;
@@ -416,19 +414,7 @@ public:
FixupPath( p, path );
for( sp = fs_searchpaths; sp; sp = sp->next )
{
size_t splen = Q_strlen( sp->filename );
if( !Q_strnicmp( sp->filename, p, splen ))
{
Q_strncpy( out, p + splen + 1, 512 );
return true;
}
}
Q_strncpy( out, p, 512 );
return false;
return FS_FullPathToRelativePath( out, p, 512 );
}
bool GetCurrentDirectory( char *p, int size ) override