From d300373b96ca5ee5fcf45a20ee1a2f2daea350c5 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Fri, 26 Jul 2024 23:37:40 +0100 Subject: [PATCH] anoia fs.dir use case not match match was accidentally pinning the return from readdir against the function parameter. Which didn't work. --- pkgs/anoia/fs.fnl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/anoia/fs.fnl b/pkgs/anoia/fs.fnl index 71693e8..ce1007f 100644 --- a/pkgs/anoia/fs.fnl +++ b/pkgs/anoia/fs.fnl @@ -38,9 +38,10 @@ (fn dir [name] (let [dp (assert (ll.opendir name) name)] (fn [] - (match (ll.readdir dp) - (name type) (values name type) - (nil err) (do (if err (print err)) (ll.closedir dp) nil))))) + (case (ll.readdir dp) + (name filetype) (values name filetype) + (nil err) (do (if (> err 0) (print "ERR" err)) (ll.closedir dp) nil) + )))) (fn rmtree [pathname] (case (file-type pathname)