From 4f021d8abcf7ffe21d5458317f6fee8854ab04e2 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Thu, 21 May 2026 16:41:29 -0500 Subject: [PATCH] fix(archive): log swallowed walkdir errors during transmittal indexing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit indexTransmittalFolder silently dropped per-entry walk errors (`_ = err`), so a permission or filesystem error on one file vanished without a trace — the operator saw "missing from the index" with no clue why. Log it (the slog.Warn the comment had already drafted) and keep indexing the rest. Co-Authored-By: Claude Opus 4.7 (1M context) --- zddc/internal/archive/index.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zddc/internal/archive/index.go b/zddc/internal/archive/index.go index e3ba666..2c58743 100644 --- a/zddc/internal/archive/index.go +++ b/zddc/internal/archive/index.go @@ -120,8 +120,10 @@ func walkAndIndex(idx *Index, fsRoot, dirAbs, serverDir string) error { func indexTransmittalFolder(idx *Index, fsRoot, folderAbs, folderServerPath, date string) error { return filepath.WalkDir(folderAbs, func(path string, d os.DirEntry, err error) error { if err != nil { - // Log the error but continue indexing other files - _ = err // would log here: slog.Warn("walkdir error", "path", path, "err", err) + // Log and continue indexing the rest of the folder — a + // permission or FS error on one entry shouldn't abort the + // whole transmittal index or vanish without a trace. + slog.Warn("transmittal index: walkdir error", "path", path, "err", err) return nil } if d.IsDir() {