mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: filesystem: do not create folders for files in rodir mode
This commit is contained in:
parent
0963e05716
commit
7e574ea42e
@ -2114,9 +2114,15 @@ void FS_Init( void )
|
|||||||
|
|
||||||
for( i = 0; i < dirs.numstrings; i++ )
|
for( i = 0; i < dirs.numstrings; i++ )
|
||||||
{
|
{
|
||||||
// no need to check folders here, FS_CreatePath will not fail if path exists
|
const char *roPath = va( "%s" PATH_SPLITTER "%s", host.rodir, dirs.strings[i] );
|
||||||
// and listdirectory returns only really existing directories
|
const char *rwPath = va( "%s" PATH_SPLITTER "%s", host.rootdir, dirs.strings[i] );
|
||||||
FS_CreatePath( va( "%s" PATH_SPLITTER "%s/", host.rootdir, dirs.strings[i] ));
|
|
||||||
|
// check if it's a directory
|
||||||
|
if( !FS_SysFolderExists( roPath ))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// no need to check folders here, FS_CreatePath will not fail
|
||||||
|
FS_CreatePath( rwPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
stringlistfreecontents( &dirs );
|
stringlistfreecontents( &dirs );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user