mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
sys_sdl.c: implemented Sys_mkdir.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@86 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
7d6a47a0f2
commit
38a5823de7
1 changed files with 16 additions and 1 deletions
|
@ -20,9 +20,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
*/
|
||||
|
||||
#include "quakedef.h"
|
||||
#include <sys/types.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include "errno.h"
|
||||
|
||||
#include "quakedef.h"
|
||||
|
||||
#define CONSOLE_ERROR_TIMEOUT 60.0 /* # of seconds to wait on Sys_Error running */
|
||||
qboolean isDedicated;
|
||||
static qboolean sc_return_on_enter = false;
|
||||
|
@ -131,6 +139,13 @@ int Sys_FileTime (char *path)
|
|||
|
||||
void Sys_mkdir (char *path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
int rc = _mkdir (path);
|
||||
#else
|
||||
int rc = mkdir (path, 0777);
|
||||
#endif
|
||||
if (rc != 0 && errno != EEXIST)
|
||||
Sys_Error("Unable to create directory %s", path);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue