* Reimplement r1597-1598 in a better way (Oopss)
* Fix Sys_SetEnv warning
This commit is contained in:
1 parent
e8f5d5055d
commit
eee9770fbf
4 files changed
+24
-27
No files matched your search
+7
-10
@@ -77,14 +77,6 @@ char *Sys_DefaultHomePath( void )
|
||||
Q_strncpyz( homePath, szPath, sizeof( homePath ) );
|
||||
Q_strcat( homePath, sizeof( homePath ), "\\Quake3" );
|
||||
FreeLibrary(shfolder);
|
||||
if( !CreateDirectory( homePath, NULL ) )
|
||||
{
|
||||
if( GetLastError() != ERROR_ALREADY_EXISTS )
|
||||
{
|
||||
Com_Printf("Unable to create directory \"%s\"\n", homePath );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return homePath;
|
||||
@@ -279,9 +271,14 @@ const char *Sys_Dirname( char *path )
|
||||
Sys_Mkdir
|
||||
==============
|
||||
*/
|
||||
void Sys_Mkdir( const char *path )
|
||||
qboolean Sys_Mkdir( const char *path )
|
||||
{
|
||||
_mkdir (path);
|
||||
int result = _mkdir( path );
|
||||
|
||||
if( result != 0 )
|
||||
return errno == EEXIST;
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user