Bugfix create /var/necronda-server/

This commit is contained in:
2020-12-28 14:01:16 +01:00
parent 161952441d
commit c0962b90a6

View File

@ -44,7 +44,12 @@ int cache_process() {
}
cache = shm_rw;
mkdir("/var/necronda-server", 0755);
if (mkdir("/var/necronda-server/", 0755) < 0) {
if (errno != EEXIST) {
fprintf(stderr, ERR_STR "Unable to create directory '/var/necronda-server/': %s" CLR_STR "\n", strerror(errno));
return -3;
}
}
FILE *cache_file = fopen("/var/necronda-server/cache", "rb");
if (cache_file != NULL) {