Fix baseURL for relative paths

This commit is contained in:
Christian Muehlhaeuser 2019-12-10 15:55:49 +01:00
parent ee81103ce0
commit 584adfdbd1

View file

@ -78,9 +78,10 @@ func readerFromArg(s string) (*Source, error) {
st, err := os.Stat(s)
if len(s) == 0 || (err == nil && st.IsDir()) {
for _, v := range readmeNames {
r, err := os.Open(filepath.Join(s, v))
n := filepath.Join(s, v)
r, err := os.Open(n)
if err == nil {
u, _ := filepath.Abs(v)
u, _ := filepath.Abs(n)
return &Source{r, u}, nil
}
}