Skip to content

Commit

Permalink
yajsv: Fix absolute paths in file list
Browse files Browse the repository at this point in the history
  • Loading branch information
neilpa committed Jan 31, 2020
1 parent caf6fa2 commit a50aef5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func main() {
scanner := bufio.NewScanner(f)
for scanner.Scan() {
// Calclate the glob relative to the directory of the file list
pattern := filepath.Join(dir, strings.TrimSpace(scanner.Text()))
pattern := strings.TrimSpace(scanner.Text())
if !filepath.IsAbs(pattern) {
pattern = filepath.Join(dir, pattern)
}
docs = append(docs, glob(pattern)...)
}
if err := scanner.Err(); err != nil {
Expand Down

0 comments on commit a50aef5

Please sign in to comment.