summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/config.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/config.cc b/src/common/config.cc
index 5c64f4ec151..3d25e8349d6 100644
--- a/src/common/config.cc
+++ b/src/common/config.cc
@@ -799,9 +799,14 @@ void md_config_t::get_my_sections(std::vector <std::string> &sections) const
void md_config_t::_get_my_sections(std::vector <std::string> &sections) const
{
assert(lock.is_locked());
- sections.push_back(name.to_str());
- sections.push_back(name.get_type_name());
+ string s = name.to_str();
+ sections.push_back(s);
+ size_t pos = s.rfind('.');
+ while (pos > 0 && pos != string::npos) {
+ sections.push_back(s.substr(0, pos));
+ pos = s.rfind('.', pos - 1);
+ }
sections.push_back("global");
}