Fix for double slashes.
This commit is contained in:
parent
54bc8d744d
commit
404f88c099
@ -6,6 +6,7 @@ import (
|
||||
"dwelling-files/web"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"git.arav.su/Arav/httpr"
|
||||
)
|
||||
@ -30,7 +31,10 @@ func New(directoryPath *string, noFileHandling bool) *FilesHandlers {
|
||||
}
|
||||
|
||||
func (h *FilesHandlers) Index(w http.ResponseWriter, r *http.Request) {
|
||||
path := "/" + httpr.Param(r, "filepath") + "/"
|
||||
path := "/" + httpr.Param(r, "filepath")
|
||||
if !strings.HasSuffix(path, "/") {
|
||||
path += "/"
|
||||
}
|
||||
|
||||
currentPath := files.CurrentPath(path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user