diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-09-18 11:39:43 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-09-18 11:39:43 +0100 |
| commit | 8eb153f1a87f8ac6028f3f7950ce221f42f4c4a0 (patch) | |
| tree | 646db457cf72f8c4da2a7f919924d8f77decf469 /src | |
| parent | 68fa1dd3a1d414cd27178a65dba26627cb533734 (diff) | |
| download | rabbitmq-server-git-8eb153f1a87f8ac6028f3f7950ce221f42f4c4a0.tar.gz | |
Make sure we only return the plugins we want here even if others are unpacked.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_plugins.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index 84a0d022e6..46e91e3556 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -163,8 +163,8 @@ prepare_plugins(Enabled) -> {ok, ExpandDir} = application:get_env(rabbit, plugins_expand_dir), AllPlugins = list(PluginsDistDir), - ToUnpack = dependencies(false, Enabled, AllPlugins), - ToUnpackPlugins = lookup_plugins(ToUnpack, AllPlugins), + Wanted = dependencies(false, Enabled, AllPlugins), + WantedPlugins = lookup_plugins(Wanted, AllPlugins), case filelib:ensure_dir(ExpandDir ++ "/") of ok -> ok; @@ -172,10 +172,11 @@ prepare_plugins(Enabled) -> [ExpandDir, E2]}}) end, - [prepare_plugin(Plugin, ExpandDir) || Plugin <- ToUnpackPlugins], + [prepare_plugin(Plugin, ExpandDir) || Plugin <- WantedPlugins], [prepare_dir_plugin(PluginAppDescPath) || - PluginAppDescPath <- filelib:wildcard(ExpandDir ++ "/*/ebin/*.app")]. + PluginAppDescPath <- filelib:wildcard(ExpandDir ++ "/*/ebin/*.app")], + Wanted. clean_plugins(Plugins) -> {ok, ExpandDir} = application:get_env(rabbit, plugins_expand_dir), |
