diff --git a/src/dataStore/RouteEntity.cpp b/src/dataStore/RouteEntity.cpp index 3f08ed3..252cf08 100644 --- a/src/dataStore/RouteEntity.cpp +++ b/src/dataStore/RouteEntity.cpp @@ -785,17 +785,17 @@ namespace Configs { bool RoutingChain::add_simple_process_rule(const QString& content, const std::shared_ptr& rule, ruleType type) { auto sp = content.split(":"); - if (sp.size() != 2) return false; - const QString& address = sp[1]; const QString& subType = sp[0]; - if (subType == "processName" && type == simpleProcessName) - { - if (!rule->process_name.contains(address)) rule->process_name.append(address); - return true; - } else if (subType == "processPath" && type == simpleProcessPath) + if (subType == "processPath" && type == simpleProcessPath) { + const QString& address = content.section(':', 0); if (!rule->process_path.contains(address)) rule->process_path.append(address); return true; + } else if (subType == "processName" && type == simpleProcessName && sp.size() == 2) + { + const QString& address = sp[1]; + if (!rule->process_name.contains(address)) rule->process_name.append(address); + return true; } else { return false;