mirror of https://git.48k.eu/ogserver
rest: create new shell folder automagically
If folder does not exist, create it. This makes it easier to transition from existing deployments.master
parent
814daceeee
commit
23bd5f1a07
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue