Skip to content

Commit

Permalink
lightningd: really remove relative plugins dirs.
Browse files Browse the repository at this point in the history
We promised this in 0.8.1!

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Removed: Plugin: Relative plugin paths are not relative to startup (deprecated v0.7.2.1)
  • Loading branch information
rustyrussell committed Sep 18, 2020
1 parent 288aa39 commit 34a6294
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions lightningd/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,24 +1223,10 @@ char *add_plugin_dir(struct plugins *plugins, const char *dir, bool error_ok)
struct plugin *p;

if (!d) {
if (deprecated_apis && !path_is_abs(dir)) {
dir = path_join(tmpctx,
plugins->ld->original_directory, dir);
d = opendir(dir);
if (d) {
log_unusual(plugins->log, "DEPRECATED WARNING:"
" plugin-dir is now relative to"
" lightning-dir, please change to"
" plugin-dir=%s",
dir);
}
}
if (!d) {
if (!error_ok && errno == ENOENT)
return NULL;
return tal_fmt(NULL, "Failed to open plugin-dir %s: %s",
dir, strerror(errno));
}
if (!error_ok && errno == ENOENT)
return NULL;
return tal_fmt(NULL, "Failed to open plugin-dir %s: %s",
dir, strerror(errno));
}

while ((di = readdir(d)) != NULL) {
Expand Down

0 comments on commit 34a6294

Please sign in to comment.