Update file.go (#2005)

pull/2009/head
songzhibin97 3 years ago committed by GitHub
parent 53c8877ce4
commit 8a8626331d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      config/file/file.go

@ -42,7 +42,7 @@ func (f *file) loadFile(path string) (*config.KeyValue, error) {
}
func (f *file) loadDir(path string) (kvs []*config.KeyValue, err error) {
files, err := os.ReadDir(f.path)
files, err := os.ReadDir(path)
if err != nil {
return nil, err
}
@ -51,7 +51,7 @@ func (f *file) loadDir(path string) (kvs []*config.KeyValue, err error) {
if file.IsDir() || strings.HasPrefix(file.Name(), ".") {
continue
}
kv, err := f.loadFile(filepath.Join(f.path, file.Name()))
kv, err := f.loadFile(filepath.Join(path, file.Name()))
if err != nil {
return nil, err
}

Loading…
Cancel
Save