From 2368269e6321d92e99568337bfa3e101c83b7283 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 14 Sep 2022 14:20:09 +1000 Subject: [PATCH] Handle error in newImageBox WalkDir (#2894) --- internal/api/images.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/api/images.go b/internal/api/images.go index 7e6f8b402..19156436f 100644 --- a/internal/api/images.go +++ b/internal/api/images.go @@ -32,6 +32,10 @@ func newImageBox(box fs.FS) (*imageBox, error) { } err := fs.WalkDir(box, ".", func(path string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if d.IsDir() { return nil }