mirror of https://github.com/Dreamacro/clash.git
Fix: don't read yml if not exist (#253)
This commit is contained in:
parent
528fbd10e4
commit
288afd1308
|
@ -106,7 +106,11 @@ func readRawConfig(path string) ([]byte, error) {
|
|||
}
|
||||
|
||||
path = path[:len(path)-5] + ".yml"
|
||||
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