1
0
Fork 0

Proper tilde path clean up.

This commit is contained in:
Solderpunk 2020-06-10 19:43:49 +02:00
parent 8d2309f889
commit 599bbf4b52

View file

@ -202,8 +202,7 @@ 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)
path = filepath.Clean(path)
} else {
path = filepath.Join(config.DocBase, path)
}