From a0fb9657eb22c255d831d21adce63d0404797911 Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Sat, 21 Jun 2025 02:09:27 +0200 Subject: [PATCH] Use ./store as the storage directory --- .gitignore | 2 +- lts.go | 8 +------- tmpls/home.html | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 9c916d6..f2d6762 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,5 @@ go.work.sum watcher lts - +store ALLOWED_USERS.txt diff --git a/lts.go b/lts.go index 0aa2062..b993f3f 100644 --- a/lts.go +++ b/lts.go @@ -83,7 +83,7 @@ func basicAuth(handler http.HandlerFunc, realm string) http.HandlerFunc { } } -var storePath string +var storePath string = "./store" // https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format/ func byteCountSI(b int64) string { @@ -233,12 +233,6 @@ func watchAllowedUsers() chan bool { } func main() { - storePathValue, ok := os.LookupEnv("LTS_STORE_PATH") - if !ok { - log.Fatal("LTS_STORE_PATH not set") - } - storePath = storePathValue - reloadAllowedUsers() doneWatching := watchAllowedUsers() diff --git a/tmpls/home.html b/tmpls/home.html index 35432df..3b9bc2a 100644 --- a/tmpls/home.html +++ b/tmpls/home.html @@ -29,7 +29,7 @@

Browse

- Browse the files here + Browse the files here