Handle error in newImageBox WalkDir (#2894)

This commit is contained in:
WithoutPants 2022-09-14 14:20:09 +10:00 committed by GitHub
parent 32911367b0
commit 2368269e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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
}