mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +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
|
||||
Sys_Mkdir(const char *path)
|
||||
{
|
||||
WCHAR wpath[MAX_OSPATH] = {0};
|
||||
MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_OSPATH);
|
||||
if (!Sys_IsDir(path))
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue