* 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:
parent
0f9a5e09eb
commit
108705d31f
2 changed files with 29 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue