Q_MKDIR: use std::filesystem::create_directories

This commit is contained in:
Garux
2021-11-02 22:14:08 +03:00
parent c217ad981a
commit 396fe81cd2
4 changed files with 16 additions and 46 deletions

View File

@@ -25,8 +25,6 @@
#pragma once
#include <ctime>
// TTimo started adding portability code:
// return true if spawning was successful, false otherwise
@@ -47,14 +45,4 @@ bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateCo
// Q_mkdir
// returns true if succeeded in creating directory
#ifdef WIN32
#include <direct.h>
inline bool Q_mkdir( const char* name ){
return _mkdir( name ) != -1;
}
#else
#include <sys/stat.h>
inline bool Q_mkdir( const char* name ){
return mkdir( name, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH ) != -1; // rwxrwxr-x
}
#endif
bool Q_mkdir( const char* path );