mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
[Fixed] GEOSITE rule load fail
This commit is contained in:
parent
8595d6c2e9
commit
62b70725ef
|
@ -543,15 +543,14 @@ func parseRules(cfg *RawConfig, proxies map[string]C.Proxy) ([]C.Rule, map[strin
|
|||
|
||||
params = trimArr(params)
|
||||
|
||||
parsed, parseErr := R.ParseRule(ruleName, payload, target, params)
|
||||
if parseErr != nil {
|
||||
return nil, nil, fmt.Errorf("rules[%d] [%s] error: %s", idx, line, parseErr.Error())
|
||||
} else {
|
||||
if parsed.RuleType() == C.GEOSITE {
|
||||
if ruleName == "GEOSITE" {
|
||||
if err := initGeoSite(); err != nil {
|
||||
return nil, nil, fmt.Errorf("can't initial GeoSite: %w", err)
|
||||
}
|
||||
}
|
||||
parsed, parseErr := R.ParseRule(ruleName, payload, target, params)
|
||||
if parseErr != nil {
|
||||
return nil, nil, fmt.Errorf("rules[%d] [%s] error: %s", idx, line, parseErr.Error())
|
||||
}
|
||||
|
||||
if mode != T.Script {
|
||||
|
|
Loading…
Reference in New Issue
Block a user