From 97f3524eb92167d3a49001aa6bc3170f2c1789fe Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 18 Mar 2023 22:20:31 +0800 Subject: [PATCH] fix: ToLower first --- constant/path.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/constant/path.go b/constant/path.go index 29ac9872..707c53f6 100644 --- a/constant/path.go +++ b/constant/path.go @@ -66,7 +66,7 @@ func (p *path) MMDB() string { // 目录则直接跳过 continue } else { - if strings.EqualFold(fi.Name(), "Country.mmdb") { + if strings.EqualFold(strings.ToLower(fi.Name()), "country.mmdb") { GeoipName = fi.Name() return P.Join(p.homeDir, fi.Name()) } @@ -93,7 +93,7 @@ func (p *path) GeoIP() string { // 目录则直接跳过 continue } else { - if strings.EqualFold(fi.Name(), "GeoIP.dat") { + if strings.EqualFold(strings.ToLower(fi.Name()), "geoip.dat") { GeoipName = fi.Name() return P.Join(p.homeDir, fi.Name()) } @@ -112,7 +112,7 @@ func (p *path) GeoSite() string { // 目录则直接跳过 continue } else { - if strings.EqualFold(fi.Name(), "GeoSite.dat") { + if strings.EqualFold(strings.ToLower(fi.Name()), "geosite.dat") { GeositeName = fi.Name() return P.Join(p.homeDir, fi.Name()) }