summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rest.c b/src/rest.c
index 5e1d468..81c3dd9 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -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",