1
0
Fork 0

A -no-file-handling argument was inversed to -file-handling. So, by default no file handling occure from now.

This commit is contained in:
Alexander Andreev 2022-12-17 21:33:10 +04:00
parent 2c583201d7
commit 760d08dcde
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F
1 changed files with 2 additions and 2 deletions

View File

@ -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)