#include "common/plugins/types/tag_plugin.h"
#include "common/utils/glist_range.h"
+namespace {
+
+bool IsSubKey(const std::string& subkey, const std::string& key) {
+ if (subkey.find(key) != 0)
+ return false;
+ if (subkey.size() != key.size() && subkey.at(key.size()) != '/')
+ return false;
+ return true;
+}
+
+} // namespace
+
namespace common_installer {
bool PluginManager::GenerateUnknownTagList(
for (application_x* app : GListRange<application_x*>(
manifest_->application)) {
for (metadata_x* meta : GListRange<metadata_x*>(app->metadata)) {
- if (std::string(meta->key).compare(plugin_info->name()) == 0) {
+ if (IsSubKey(meta->key, plugin_info->name())) {
plugin = factory.CreatePluginByPluginInfo(*plugin_info);
if (!plugin) {
LOG(WARNING) << "Failed to load plugin: " << plugin_info->path()