Minimal error handling for Sys_Mkdir() under unixlike platforms.

This commit is contained in:
Yamagi 2020-12-31 08:55:09 +01:00
parent 8e223b2743
commit 60d881437b

View file

@ -434,7 +434,13 @@ Sys_GetGameAPI(void *parms)
void void
Sys_Mkdir(const char *path) Sys_Mkdir(const char *path)
{ {
mkdir(path, 0755); if (!Sys_IsDir(path))
{
if (mkdir(path, 0755) != 0)
{
Com_Error(ERR_FATAL, "Couldn't create dir %s\n", path);
}
}
} }
qboolean qboolean