From e4d9d507f5a05a0ca68c645348b32ae11e7a1c02 Mon Sep 17 00:00:00 2001
From: Patrick Pacher
Date: Mon, 6 Jul 2020 15:07:55 +0200
Subject: [PATCH] Fix incorrect path in ReadDir
---
conf/read_dir.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/conf/read_dir.go b/conf/read_dir.go
index d1db565..c626741 100644
--- a/conf/read_dir.go
+++ b/conf/read_dir.go
@@ -3,6 +3,7 @@ package conf
import (
"fmt"
"io/ioutil"
+ "path/filepath"
"strings"
)
@@ -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)
}