plugins: document and extend the ~/.lightning/plugins/ dir.

Load any plugins directly as well as subdirs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-07-29 17:08:30 +09:30
committed by Christian Decker
parent 4f937ea1f0
commit 310d806dd3
4 changed files with 10 additions and 4 deletions

View File

@@ -909,6 +909,9 @@ void plugins_add_default_dir(struct plugins *plugins, const char *default_dir)
DIR *d = opendir(default_dir);
if (d) {
struct dirent *di;
/* Add this directory itself, and recurse down once. */
add_plugin_dir(plugins, default_dir, true);
while ((di = readdir(d)) != NULL) {
if (streq(di->d_name, ".") || streq(di->d_name, ".."))
continue;