From 760d08dcde312fe1bf13c368906d7d4fdd49630c Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 17 Dec 2022 21:33:10 +0400 Subject: [PATCH] A -no-file-handling argument was inversed to -file-handling. So, by default no file handling occure from now. --- cmd/dwelling-files/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/dwelling-files/main.go b/cmd/dwelling-files/main.go index b52e032..54734fa 100644 --- a/cmd/dwelling-files/main.go +++ b/cmd/dwelling-files/main.go @@ -18,7 +18,7 @@ var version string var listenAddress *string = flag.String("listen", "/var/run/dwelling-files/sock", "listen address (ip:port|unix_path)") var directoryPath *string = flag.String("path", "/srv/ftp", "path to file share") -var disableFileHandler *bool = flag.Bool("no-file-handling", false, "disable file handling if it is handled by something else (e.g. NGiNX)") +var enableFileHandler *bool = flag.Bool("file-handling", false, "enable file handling if it is handled by something else (e.g. NGiNX)") var showVersion *bool = flag.Bool("v", false, "show version") func main() { @@ -30,7 +30,7 @@ func main() { return } - hand := handlers.New(directoryPath, web.Assets(), *disableFileHandler) + hand := handlers.New(directoryPath, web.Assets(), !*enableFileHandler) srv := server.NewHttpServer() srv.GET("/*filepath", hand.Index)