From 9e16e80f3c9ae663e3ecf596a578a852172e38fb Mon Sep 17 00:00:00 2001 From: diamondburned Date: Tue, 6 Jul 2021 23:54:54 -0700 Subject: [PATCH] fileserver: Fix browse name_dir_first sorting (#4218) This commit fixes the `sortByNameDirFirst` variable inside fileserver to match what browse's default template has. Co-authored-by: Francis Lavoie --- modules/caddyhttp/fileserver/browsetplcontext.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/fileserver/browsetplcontext.go b/modules/caddyhttp/fileserver/browsetplcontext.go index 489e8c05..d420c489 100644 --- a/modules/caddyhttp/fileserver/browsetplcontext.go +++ b/modules/caddyhttp/fileserver/browsetplcontext.go @@ -264,7 +264,7 @@ func (l byTime) Less(i, j int) bool { return l.Items[i].ModTime.Before(l.Items[j const ( sortByName = "name" - sortByNameDirFirst = "name_dir_first" + sortByNameDirFirst = "namedirfirst" sortBySize = "size" sortByTime = "time" )