mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-26 10:31:29 +00:00
Fix geo resource download path
This commit is contained in:
parent
b14ae51f71
commit
6da1460795
|
@ -898,10 +898,9 @@ func (r *Router) prepareGeoIPDatabase() error {
|
||||||
geoPath = "geoip.db"
|
geoPath = "geoip.db"
|
||||||
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
||||||
geoPath = foundPath
|
geoPath = foundPath
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
geoPath = C.BasePath(geoPath)
|
geoPath = C.BasePath(geoPath)
|
||||||
}
|
|
||||||
}
|
|
||||||
if !rw.FileExists(geoPath) {
|
if !rw.FileExists(geoPath) {
|
||||||
r.logger.Warn("geoip database not exists: ", geoPath)
|
r.logger.Warn("geoip database not exists: ", geoPath)
|
||||||
var err error
|
var err error
|
||||||
|
@ -935,10 +934,9 @@ func (r *Router) prepareGeositeDatabase() error {
|
||||||
geoPath = "geosite.db"
|
geoPath = "geosite.db"
|
||||||
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
if foundPath, loaded := C.FindPath(geoPath); loaded {
|
||||||
geoPath = foundPath
|
geoPath = foundPath
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
geoPath = C.BasePath(geoPath)
|
geoPath = C.BasePath(geoPath)
|
||||||
}
|
|
||||||
}
|
|
||||||
if !rw.FileExists(geoPath) {
|
if !rw.FileExists(geoPath) {
|
||||||
r.logger.Warn("geosite database not exists: ", geoPath)
|
r.logger.Warn("geosite database not exists: ", geoPath)
|
||||||
var err error
|
var err error
|
||||||
|
|
Loading…
Reference in a new issue