Skip to content

Commit

Permalink
Fix incorrect path in ReadDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Pacher committed Jul 6, 2020
1 parent 5b5656d commit e4d9d50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conf/read_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package conf
import (
"fmt"
"io/ioutil"
"path/filepath"
"strings"
)

Expand All @@ -24,7 +25,8 @@ func ReadDir(directory, suffix string, spec map[string][]OptionSpec) ([]*File, e
continue
}

f, err := LoadFile(e.Name())
path := filepath.Join(directory, e.Name())
f, err := LoadFile(path)
if err != nil {
return files, fmt.Errorf("%s: %w", e.Name(), err)
}
Expand Down

0 comments on commit e4d9d50

Please sign in to comment.