anoia fs.dir use case not match
match was accidentally pinning the return from readdir against the function parameter. Which didn't work.
This commit is contained in:
parent
70ca7fac17
commit
d300373b96
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user