mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 18:11:28 +00:00
Rename find path
This commit is contained in:
parent
86a38a1c7e
commit
dcd7ca78fc
|
@ -11,7 +11,7 @@ const dirName = "sing-box"
|
||||||
|
|
||||||
var resourcePaths []string
|
var resourcePaths []string
|
||||||
|
|
||||||
func Find(name string) (string, bool) {
|
func FindPath(name string) (string, bool) {
|
||||||
name = os.ExpandEnv(name)
|
name = os.ExpandEnv(name)
|
||||||
if rw.FileExists(name) {
|
if rw.FileExists(name) {
|
||||||
return name, true
|
return name, true
|
||||||
|
|
|
@ -307,7 +307,7 @@ func (r *Router) prepareGeoIPDatabase() error {
|
||||||
geoPath = r.geoIPOptions.Path
|
geoPath = r.geoIPOptions.Path
|
||||||
} else {
|
} else {
|
||||||
geoPath = "geoip.db"
|
geoPath = "geoip.db"
|
||||||
if foundPath, loaded := C.Find(geoPath); loaded {
|
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
||||||
geoPath = foundPath
|
geoPath = foundPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ func (r *Router) prepareGeositeDatabase() error {
|
||||||
geoPath = r.geoIPOptions.Path
|
geoPath = r.geoIPOptions.Path
|
||||||
} else {
|
} else {
|
||||||
geoPath = "geosite.db"
|
geoPath = "geosite.db"
|
||||||
if foundPath, loaded := C.Find(geoPath); loaded {
|
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
||||||
geoPath = foundPath
|
geoPath = foundPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue