Fix absolute path bug Quick workaround
alex wennerberg alex@alexwennerberg.com
Tue, 29 Dec 2020 20:41:34 -0800
3 files changed,
4 insertions(+),
3 deletions(-)
M
config.go
→
config.go
@@ -2,6 +2,7 @@ package main
import ( "github.com/BurntSushi/toml" + "path/filepath" ) type Config struct {@@ -34,5 +35,7 @@ _, err := toml.DecodeFile(filename, &config)
if err != nil { return config, err } + // Workaround for how some of my path fns are written + config.FilesDirectory, _ = filepath.Abs(config.FilesDirectory) return config, nil }
M
example-config.toml
→
example-config.toml
@@ -9,8 +9,7 @@ HttpPort=8165
HttpsEnabled=false # Folder containing subfolders for each user's files -# Must be absolute path due to bug -FilesDirectory="/home/alex/dev/go-flounder/files" +FilesDirectory="./files" LogFile="./flounder.log" # Gemini autogenerates self-signed certs