From d622430a6fa16b4be1e3d8bef0285e71fc3710c7 Mon Sep 17 00:00:00 2001 From: Roi Feng <37480123+Rayzggz@users.noreply.github.com> Date: Wed, 28 May 2025 12:31:44 -0400 Subject: [PATCH] fix: File path error use filepath join to connect the config file path --- internal/config/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 85213ba..3b70c0f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -100,25 +100,25 @@ func LoadRules(rulePath string) (*RuleSet, error) { } // Load IP Allow List - ipAllowFile := rulePath + "/IP_AllowList.conf" + ipAllowFile := filepath.Join(rulePath, "/IP_AllowList.conf") if err := loadIPRules(ipAllowFile, rs.IPAllowTrie); err != nil { return nil, err } // Load IP Block List - ipBlockFile := rulePath + "/IP_BlockList.conf" + ipBlockFile := filepath.Join(rulePath, "/IP_BlockList.conf") if err := loadIPRules(ipBlockFile, rs.IPBlockTrie); err != nil { return nil, err } // Load URL Allow List - urlAllowFile := rulePath + "/URL_AllowList.conf" + urlAllowFile := filepath.Join(rulePath, "/URL_AllowList.conf") if err := loadURLRules(urlAllowFile, rs.URLAllowList); err != nil { return nil, err } // Load URL Block List - urlBlockFile := rulePath + "/URL_BlockList.conf" + urlBlockFile := filepath.Join(rulePath, "/URL_BlockList.conf") if err := loadURLRules(urlBlockFile, rs.URLBlockList); err != nil { return nil, err }