From 97350b55d3fbee5d8b2268c34360ad161363a8b5 Mon Sep 17 00:00:00 2001 From: "alexey.stratulat" <alexey.stratulat@demlabs.net> Date: Tue, 28 Apr 2020 20:58:12 +0700 Subject: [PATCH] [*] When receiving the by default path to plugins, the cellframe is replaced with the result of calling the dap_get _appname function. --- src/dap_chain_plugins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dap_chain_plugins.c b/src/dap_chain_plugins.c index 52e5977..c0fa2e4 100644 --- a/src/dap_chain_plugins.c +++ b/src/dap_chain_plugins.c @@ -5,8 +5,9 @@ int dap_chain_plugins_init(dap_config_t *a_config){ if(dap_config_get_item_bool_default(a_config, "plugins", "py_load", false)){ + const char *l_defaule_path_plugins = dap_strjoin(NULL, "/opt/", dap_get_appname(), "/var/plugins/", NULL); const char *l_plugins_root_path = dap_config_get_item_str_default(a_config, "plugins", "py_path", - "/opt/cellframe-node/var/plugins/"); + l_defaule_path_plugins); s_plugins_root_path = dap_strjoin(NULL, l_plugins_root_path, "/", NULL); log_it(L_INFO, "Start initialize python plugins. Path plugins %s", s_plugins_root_path); if (!dap_dir_test(s_plugins_root_path)){ -- GitLab