If event script directory does not exist, then return ENOTDIR. If a
directory gets removed at runtime, report error from scandir in
get_script_list().
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
script_dir, ret);
}
*out = NULL;
- ret = 0;
goto done;
}
if (! S_ISDIR(st.st_mode)) {
talloc_free(run_ctx);
- return EINVAL;
+ return ENOTDIR;
}
run_ctx->script_dir = talloc_strdup(run_ctx, script_dir);