mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-08-28 04:46:58 -04:00
case insensitive indexing
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
@@ -79,6 +80,7 @@ func humanize(bytes int64) string {
|
||||
func replyList(w http.ResponseWriter, fullPath string, path string) {
|
||||
_files, err := ioutil.ReadDir(fullPath)
|
||||
check(err)
|
||||
sort.Slice(_files, func(i, j int) bool { return strings.ToLower(_files[i].Name()) < strings.ToLower(_files[j].Name()) })
|
||||
|
||||
if !strings.HasSuffix(path, "/") {
|
||||
path += "/"
|
||||
|
||||
Reference in New Issue
Block a user