From 92f66bf5b58be5b3e605bb481db5f5ffd6b2aa78 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:08:34 +0800 Subject: [PATCH] Fix Clash classical rule provider not renaming properly --- src/generator/template/templates.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator/template/templates.cpp b/src/generator/template/templates.cpp index 0f53adcde..f9917e33f 100644 --- a/src/generator/template/templates.cpp +++ b/src/generator/template/templates.cpp @@ -357,10 +357,10 @@ int renderClashScript(YAML::Node &base_rule, std::vector &rulese if(x.rule_type == RULESET_CLASH_IPCIDR || x.rule_type == RULESET_CLASH_DOMAIN || x.rule_type == RULESET_CLASH_CLASSICAL) { //rule_name = std::to_string(hash_(rule_group + rule_path)); - rule_name = old_rule_name = findFileName(rule_path); + rule_name = old_rule_name = urlDecode(findFileName(rule_path)); int idx = 2; while(std::find(groups.begin(), groups.end(), rule_name) != groups.end()) - rule_name = old_rule_name + "_" + std::to_string(idx++); + rule_name = old_rule_name + " " + std::to_string(idx++); names[rule_name] = rule_group; urls[rule_name] = "*" + rule_path; rule_type[rule_name] = x.rule_type;