Skip to content

Commit 4372e4c

Browse files
committed
sorted files by name
1 parent 6e99638 commit 4372e4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Files.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public func directoryBrowser(_ dir: String) -> ((HttpRequest) -> HttpResponse) {
5555
return .notFound
5656
}
5757
if try filePath.directory() {
58-
let files = try filePath.files()
58+
var files = try filePath.files()
59+
files.sort(by: {$0.lowercased() < $1.lowercased()})
5960
return scopes {
6061
html {
6162
body {

0 commit comments

Comments
 (0)