all repos — flounder @ 73cee727f63bc89ce49772003f5a61a79f98af8d

A small site builder for the Gemini protocol

tmpfix
alex wennerberg alex@alexwennerberg.com
Wed, 18 Nov 2020 19:03:51 -0800
commit

73cee727f63bc89ce49772003f5a61a79f98af8d

parent

9d08acc9a00f80cfbbc0145ddf0608a00593770e

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M main.gomain.go

@@ -85,12 +85,13 @@ // get the user-reltaive local path from the filespath

// NOTE -- dont use on unsafe input ( I think ) func getLocalPath(filesPath string) string { l := len(strings.Split(c.FilesDirectory, "/")) - return strings.Join(strings.Split(filesPath, "/")[l:], "/") + return strings.Join(strings.Split(filesPath, "/")[l+1:], "/") } func getCreator(filePath string) string { l := len(strings.Split(c.FilesDirectory, "/")) - r := strings.Split(filePath, "/")[l-1] + r := strings.Split(filePath, "/")[l] + fmt.Println(filePath, c.FilesDirectory, r) return r }