diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-10 15:55:49 +0100 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-10 15:55:49 +0100 |
commit | 584adfdbd1d1f95c1b5ec0cc5385defde52cfbea (patch) | |
tree | e3b247f657e7c4c098750be8d78bde5a49d76af6 /main.go | |
parent | ee81103ce04a4d15b2f1c6371d9dd98ceadbdf2c (diff) |
Fix baseURL for relative paths
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 } } |