summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-12-10 15:55:49 +0100
committerChristian Muehlhaeuser <muesli@gmail.com>2019-12-10 15:55:49 +0100
commit584adfdbd1d1f95c1b5ec0cc5385defde52cfbea (patch)
treee3b247f657e7c4c098750be8d78bde5a49d76af6 /main.go
parentee81103ce04a4d15b2f1c6371d9dd98ceadbdf2c (diff)
Fix baseURL for relative paths
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index e389dee..447caa4 100644
--- a/main.go
+++ b/main.go
@@ -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
}
}