* Rewrite win32 Sys_Mkdir to use CreateDirectory

* Make FS_ReplaceSeparators filter out runs of multiple separators
* Make FS_CreatePath skip creation of the root directory
This commit is contained in:
Tim Angus 2009-11-07 16:43:02 +00:00
parent 0f9a5e09eb
commit 108705d31f
2 changed files with 29 additions and 11 deletions

View file

@ -273,10 +273,11 @@ Sys_Mkdir
*/
qboolean Sys_Mkdir( const char *path )
{
int result = _mkdir( path );
if( result != 0 )
return errno == EEXIST;
if( !CreateDirectory( path, NULL ) )
{
if( GetLastError( ) != ERROR_ALREADY_EXISTS )
return qfalse;
}
return qtrue;
}