mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-20 17:08:20 +08:00
Fix: don't read yml if not exist (#253)
This commit is contained in:
parent
72beaf1327
commit
6a5d32bf61
@ -106,7 +106,11 @@ func readRawConfig(path string) ([]byte, error) {
|
||||
}
|
||||
|
||||
path = path[:len(path)-5] + ".yml"
|
||||
return ioutil.ReadFile(path)
|
||||
if _, err = os.Stat(path); err == nil {
|
||||
return ioutil.ReadFile(path)
|
||||
}
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func readConfig(path string) (*rawConfig, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user