From e4febe62efcfd42bb7952ae54c5bcd0fb1370d4d Mon Sep 17 00:00:00 2001 From: Pierre Curto Date: Wed, 2 Aug 2023 22:54:25 +0200 Subject: [PATCH] lib/std/io: make PathWalker return an optional Signed-off-by: Pierre Curto --- lib/std/io/path.c3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/io/path.c3 b/lib/std/io/path.c3 index 3e5677420..072912889 100644 --- a/lib/std/io/path.c3 +++ b/lib/std/io/path.c3 @@ -407,7 +407,7 @@ fn String Path.root_directory(self) return path_str; } -def PathWalker = fn bool(Path, bool is_dir, void*); +def PathWalker = fn bool! (Path, bool is_dir, void*); /* * Walk the path recursively. PathWalker is run on every file and @@ -425,7 +425,7 @@ fn bool! Path.walk(self, PathWalker w, void* data) if (f.as_str() == "." || f.as_str() == "..") continue; f = abs.append(f.as_str(), using)!; bool is_directory = is_dir(f); - if (w(f, is_directory, data)) return true; + if (w(f, is_directory, data)!) return true; if (is_directory && f.walk(w, data)!) return true; } };