Use ./store as the storage directory

This commit is contained in:
kamkow1
2025-06-21 02:09:27 +02:00
parent 622b98f40a
commit a0fb9657eb
3 changed files with 3 additions and 9 deletions

2
.gitignore vendored
View File

@ -33,5 +33,5 @@ go.work.sum
watcher watcher
lts lts
store
ALLOWED_USERS.txt ALLOWED_USERS.txt

8
lts.go
View File

@ -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/ // https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format/
func byteCountSI(b int64) string { func byteCountSI(b int64) string {
@ -233,12 +233,6 @@ func watchAllowedUsers() chan bool {
} }
func main() { func main() {
storePathValue, ok := os.LookupEnv("LTS_STORE_PATH")
if !ok {
log.Fatal("LTS_STORE_PATH not set")
}
storePath = storePathValue
reloadAllowedUsers() reloadAllowedUsers()
doneWatching := watchAllowedUsers() doneWatching := watchAllowedUsers()

View File

@ -29,7 +29,7 @@
<section> <section>
<h2>Browse</h2> <h2>Browse</h2>
<p> <p>
Browse the files <a href="/store">here</a> Browse the files <a href="/browse">here</a>
</p> </p>
</section> </section>
<script> <script>