mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 12:42:27 +08:00
Fix: throw correct error in read config
This commit is contained in:
parent
3b0cc8548c
commit
8e10e67b89
@ -121,11 +121,11 @@ func readRawConfig(path string) ([]byte, error) {
|
||||
}
|
||||
|
||||
path = path[:len(path)-5] + ".yml"
|
||||
if _, err = os.Stat(path); err == nil {
|
||||
if _, fallbackErr := os.Stat(path); fallbackErr == nil {
|
||||
return ioutil.ReadFile(path)
|
||||
}
|
||||
|
||||
return data, nil
|
||||
return data, err
|
||||
}
|
||||
|
||||
func readConfig(path string) (*rawConfig, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user