flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 3965920b3534da07b1feba1b1dd2b82b8c5f40e7
parent 0bab54ffcc88918939cd367192be20dcd76c8f5e
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 29 Dec 2020 20:41:34 -0800

Fix absolute path bug

Quick workaround

Diffstat:
MREADME.md | 1-
Mconfig.go | 3+++
Mexample-config.toml | 3+--
3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -43,4 +43,3 @@ Patches are welcome! * [Ticket tracker](https://todo.sr.ht/~alexwennerberg/flounder) * [Mailing list](https://lists.sr.ht/~alexwennerberg/flounder-discuss) - diff --git a/config.go b/config.go @@ -2,6 +2,7 @@ package main import ( "github.com/BurntSushi/toml" + "path/filepath" ) type Config struct { @@ -34,5 +35,7 @@ func getConfig(filename string) (Config, error) { 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 } diff --git a/example-config.toml b/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