Procházet zdrojové kódy

sorted files by name

Igor Voynov před 8 roky
rodič
revize
4372e4c8a2
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      Sources/Files.swift

+ 2 - 1
Sources/Files.swift

@@ -55,7 +55,8 @@ public func directoryBrowser(_ dir: String) -> ((HttpRequest) -> HttpResponse) {
                 return .notFound
             }
             if try filePath.directory() {
-                let files = try filePath.files()
+                var files = try filePath.files()
+                files.sort(by: {$0.lowercased() < $1.lowercased()})
                 return scopes {
                     html {
                         body {