mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fixed crash on non existing directory
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -875,7 +875,7 @@ func (o *Options) processConfigFileLine(k string, v interface{}, errors *[]error
|
||||
*errors = append(*errors, &configErr{tk, "dir has no value and needs to point to a directory"})
|
||||
return
|
||||
}
|
||||
if info, err := os.Stat(dir); err != nil && (!info.IsDir() || info.Mode().Perm()&(1<<(uint(7))) == 0) {
|
||||
if info, _ := os.Stat(dir); info != nil && (!info.IsDir() || info.Mode().Perm()&(1<<(uint(7))) == 0) {
|
||||
*errors = append(*errors, &configErr{tk, "dir needs to point to an accessible directory"})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user