diff --git a/main.go b/main.go index 438d9c8..7d058e7 100644 --- a/main.go +++ b/main.go @@ -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 {