aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/App.kt13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/kotlin/App.kt b/src/main/kotlin/App.kt
index f69a960..dde993a 100644
--- a/src/main/kotlin/App.kt
+++ b/src/main/kotlin/App.kt
@@ -77,13 +77,14 @@ fun crawlFiles(ctx: Context) {
.drop(fileHome.length + (if (ctx.splats()[0].isNotEmpty()) ctx.splats()[0].length + 2 else 1))
val filePath = "$fileHome${it.toString().drop(fileHome.length)}"
files.add(if (File(filePath).isDirectory) "$fileName/" else fileName)
- ctx.render(
- "files.rocker.html", model(
- "files", files,
- "path", ctx.splats()[0]
- )
- )
}
+ files.sortWith(String.CASE_INSENSITIVE_ORDER)
+ ctx.render(
+ "files.rocker.html", model(
+ "files", files,
+ "path", ctx.splats()[0]
+ )
+ )
} else
ctx.render(
"fileview.rocker.html", model(