handle error when load point config

pull/40/head
V2Ray 2015-10-04 16:53:37 +02:00
parent 5c4095b5d8
commit 507da1a451
1 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,10 @@ func LoadConfig(file string) (*Config, error) {
config := &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 {
config.InboundConfigValue.File = filepath.Join(filepath.Dir(fixedFile), config.InboundConfigValue.File)