Commit 93c2cff8 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Don't use F_OK constant which is not defined on Windows

The MS documentation for the access() function only list numerical constants.
parent db557991
Pipeline #39735 failed with stage
in 8 minutes and 40 seconds
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#ifdef _WIN32 #ifdef _WIN32
#include <unistd.h>
#include <windows.h> #include <windows.h>
#include <shlobj.h> #include <shlobj.h>
...@@ -212,7 +211,7 @@ standard_homedir(void) ...@@ -212,7 +211,7 @@ standard_homedir(void)
dir = tmp; dir = tmp;
/* Try to create the directory if it does not yet exists. */ /* Try to create the directory if it does not yet exists. */
if (access(dir, F_OK)) { if (access(dir, 0 /* check existence */)) {
CreateDirectoryA(dir, NULL); CreateDirectoryA(dir, NULL);
} }
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment