From 8d2309f88936815bf8c59750f860bc1c123e5e1b Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Mon, 8 Jun 2020 23:03:19 +0200 Subject: [PATCH] Quick hacky fix to tilde path transformation. --- handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handler.go b/handler.go index a285bbb..90d7db3 100644 --- a/handler.go +++ b/handler.go @@ -202,6 +202,8 @@ func resolvePath(path string, config Config) (string, os.FileInfo, error) { username := bits[1][1:] new_prefix := filepath.Join(config.DocBase, config.HomeDocBase, username) path = strings.Replace(path, bits[1], new_prefix, 1) + // TODO: Fix this properly + path = strings.Replace(path, "//", "/", -1) } else { path = filepath.Join(config.DocBase, path) }