Browse Source

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 <lavofr@gmail.com>
master
diamondburned 4 years ago
committed by GitHub
parent
commit
9e16e80f3c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/caddyhttp/fileserver/browsetplcontext.go

2
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 ( const (
sortByName = "name" sortByName = "name"
sortByNameDirFirst = "name_dir_first" sortByNameDirFirst = "namedirfirst"
sortBySize = "size" sortBySize = "size"
sortByTime = "time" sortByTime = "time"
) )

Loading…
Cancel
Save