mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-18 10:02:12 +00:00
Minimal error checking for Sys_Mkdir() on windows.
This commit is contained in:
parent
60d881437b
commit
69ba055c2c
1 changed files with 9 additions and 3 deletions
12
src/backends/windows/system.c
Executable file → Normal file
12
src/backends/windows/system.c
Executable file → Normal file
|
@ -456,10 +456,16 @@ Sys_GetGameAPI(void *parms)
|
||||||
void
|
void
|
||||||
Sys_Mkdir(const char *path)
|
Sys_Mkdir(const char *path)
|
||||||
{
|
{
|
||||||
WCHAR wpath[MAX_OSPATH] = {0};
|
if (!Sys_IsDir(path))
|
||||||
MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_OSPATH);
|
{
|
||||||
|
WCHAR wpath[MAX_OSPATH] = {0};
|
||||||
|
MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_OSPATH);
|
||||||
|
|
||||||
CreateDirectoryW(wpath, NULL);
|
if (CreateDirectoryW(wpath, NULL) == 0)
|
||||||
|
{
|
||||||
|
Com_Error(ERR_FATAL, "Couldn't create dir %s\n", path);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean
|
qboolean
|
||||||
|
|
Loading…
Reference in a new issue