* Reimplement r1597-1598 in a better way (Oopss)
* Fix Sys_SetEnv warning
This commit is contained in:
parent
e8f5d5055d
commit
eee9770fbf
4 changed files with 24 additions and 27 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue