mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-10-01 00:06:11 -04:00
handle error when load point config
This commit is contained in:
parent
5c4095b5d8
commit
507da1a451
@ -59,6 +59,10 @@ func LoadConfig(file string) (*Config, error) {
|
|||||||
|
|
||||||
config := &Config{}
|
config := &Config{}
|
||||||
err = json.Unmarshal(rawConfig, config)
|
err = json.Unmarshal(rawConfig, config)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Failed to load point config: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
if !filepath.IsAbs(config.InboundConfigValue.File) && len(config.InboundConfigValue.File) > 0 {
|
if !filepath.IsAbs(config.InboundConfigValue.File) && len(config.InboundConfigValue.File) > 0 {
|
||||||
config.InboundConfigValue.File = filepath.Join(filepath.Dir(fixedFile), config.InboundConfigValue.File)
|
config.InboundConfigValue.File = filepath.Join(filepath.Dir(fixedFile), config.InboundConfigValue.File)
|
||||||
|
Loading…
Reference in New Issue
Block a user