feat: report dir size correctly

This commit is contained in:
Louis Dalibard 2024-04-27 23:00:30 +02:00
parent d3210878ea
commit d38556bc38

View File

@ -5,6 +5,7 @@ import (
"leech/config" "leech/config"
"leech/route" "leech/route"
"net/http" "net/http"
"net/url"
"github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/filesystem" "github.com/gofiber/fiber/v2/middleware/filesystem"
@ -30,7 +31,7 @@ func main() {
})) }))
for dirName, dirToServe := range config.Config.ServeDirs { for dirName, dirToServe := range config.Config.ServeDirs {
app.Static("/serve/"+dirName, dirToServe) app.Static("/serve/"+url.QueryEscape(dirName), dirToServe)
} }
app.Listen(config.Config.Host) app.Listen(config.Config.Host)