From 5bebae462e382b6679a0040ce72da5db23bb1031 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 8 Nov 2026 01:03:40 +0000 Subject: Comment on canonicalizing file paths when traversing file tree. --- kaagum/tools/base.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kaagum/tools/base.scm b/kaagum/tools/base.scm index 69d1a87..749baa2 100644 --- a/kaagum/tools/base.scm +++ b/kaagum/tools/base.scm @@ -67,6 +67,9 @@ directory, return a singleton list with @var{path} alone." (not (string-prefix? "." (basename path)))) (lambda (path stat result) (if (regexp-exec pattern-rx (basename path)) + ;; Canonicalize path when building the result. + ;; canonicalize-path accesses the filesystem and + ;; may fail; if it does, discard the file. (guard (c (#t result)) (cons (canonicalize-path path) result)) -- cgit 1.4.1