hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 8fa3ca4e9e82c2bc53983ba59a925948396d3966
parent 02dcb09bb90514f7572e1e3eb0e48adca2108bc6
Author: Yasumasa Tada <ytada@spartan.dev>
Date:   Wed, 20 Apr 2022 01:48:54 +0900

glob: handle errors explicitly

Signed-off-by: Yasumasa Tada <ytada@spartan.dev>

Diffstat:
Mglob/glob.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/glob/glob.ha b/glob/glob.ha @@ -154,7 +154,9 @@ fn next_match(fs: *fs::fs, gen: *generator) (str | void | failure) = { match (fs::stat(fs, r)) { case let s: fs::filestat => m = fs::isdir(s.mode); + case fs::error => void; }; + case fs::error => void; }; }; if (m) { @@ -162,7 +164,6 @@ fn next_match(fs: *fs::fs, gen: *generator) (str | void | failure) = { }; }; gen.matc += 1; - }; if (gen.flgs & flags::NOSORT == 0) { strstack_sort(&gen.pats, l);