diff options
-rw-r--r-- | src/rest.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -853,8 +853,12 @@ static int og_get_client_scripts(struct list_head *script_list) { struct script_entry *script; struct dirent *dent; + struct stat st; DIR *d; + if (stat(OG_SCRIPT_PATH, &st) < 0 && errno == ENOENT) + mkdir(OG_SCRIPT_PATH, 0755); + d = opendir(OG_SCRIPT_PATH); if (!d) { syslog(LOG_ERR, "Cannot open directory %s (%s:%d)\n", |