mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-01-07 09:53:58 +08:00
Fix: provider should fallback to read remote when local file invalid
This commit is contained in:
parent
dcf97ff5b4
commit
a55be58c01
@ -128,7 +128,11 @@ func (pp *ProxySetProvider) Initial() error {
|
||||
|
||||
proxies, err := pp.parse(buf)
|
||||
if err != nil {
|
||||
return err
|
||||
// parse local file error, fallback to remote
|
||||
buf, err = pp.vehicle.Read()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(pp.vehicle.Path(), buf, fileMode); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user