aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2023-11-19 18:18:23 +0000
committers-ol <s+removethis@s-ol.nu>2023-11-19 18:18:23 +0000
commit0b9588e1c8d44c80157324269248dae61a84793c (patch)
tree605d5a4164c2aaa42eb7d61cbdd32c8e44b949a0
parentserver: fix flush errors when request was aborted (diff)
downloadmmm-0b9588e1c8d44c80157324269248dae61a84793c.tar.gz
mmm-0b9588e1c8d44c80157324269248dae61a84793c.zip
sort children using _sort facet
-rw-r--r--mmm/mmmfs/fileder.moon3
1 files changed, 3 insertions, 0 deletions
diff --git a/mmm/mmmfs/fileder.moon b/mmm/mmmfs/fileder.moon
index 5d5ffa2..5008247 100644
--- a/mmm/mmmfs/fileder.moon
+++ b/mmm/mmmfs/fileder.moon
@@ -181,6 +181,9 @@ class Fileder
@facet_keys[name_key] = name_key
@facets[name_key] = name
+ if sort_fn = @get '_sort: fn'
+ table.sort @children, sort_fn
+
-- recursively walk to and return the fileder with @path == path
-- * path - the path to walk to
walk: (path) =>