all repos — flounder @ 3965920b3534da07b1feba1b1dd2b82b8c5f40e7

A small site builder for the Gemini protocol

Fix absolute path bug

Quick workaround
alex wennerberg alex@alexwennerberg.com
Tue, 29 Dec 2020 20:41:34 -0800
commit

3965920b3534da07b1feba1b1dd2b82b8c5f40e7

parent

0bab54ffcc88918939cd367192be20dcd76c8f5e

3 files changed, 4 insertions(+), 3 deletions(-)

jump to
M README.mdREADME.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) -
M config.goconfig.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.tomlexample-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