From f56887bde99feb3f7995e1948f833b83ca823486 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 24 Nov 2019 02:12:17 +0300 Subject: [PATCH] engine: fix rodir, now it always creates gamefolder in rwdir. Fixes #87 --- engine/common/filesystem.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/engine/common/filesystem.c b/engine/common/filesystem.c index 3560e068..071dfe15 100644 --- a/engine/common/filesystem.c +++ b/engine/common/filesystem.c @@ -1971,13 +1971,9 @@ void FS_Init( void ) for( i = 0; i < dirs.numstrings; i++ ) { - if( !FS_SysFolderExists( dirs.strings[i] ) || ( !Q_stricmp( dirs.strings[i], ".." ) && !fs_ext_path )) - continue; - - // magic here is that dirs.strings don't contain full path - // so code below checks and creates folders in current directory(host.rootdir) - if( !FS_SysFolderExists( dirs.strings[i] ) ) - FS_CreatePath( dirs.strings[i] ); + // no need to check folders here, FS_CreatePath will not fail if path exists + // and listdirectory returns only really existing directories + FS_CreatePath( va( "%s" PATH_SPLITTER "%s/", host.rootdir, dirs.strings[i] )); } stringlistfreecontents( &dirs );