forked from jason/cpolis
Change filepaths to use filepath.Join() where possible
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
b "streifling.com/jason/cpolis/cmd/backend"
|
||||
)
|
||||
@ -42,6 +43,6 @@ func ServePDF(c *b.Config) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
http.ServeFile(w, r, c.PDFDir+"/"+r.PathValue("id"))
|
||||
http.ServeFile(w, r, filepath.Join(c.PDFDir, r.PathValue("id")))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user