Skip to content

Commit

Permalink
fix: test this
Browse files Browse the repository at this point in the history
  • Loading branch information
rchincha committed Mar 29, 2024
1 parent 34a2970 commit 60783be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions oci/layer/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,12 @@ func isOverlayWhiteout(info os.FileInfo, fullPath string, fsEval fseval.FsEval)
// also evaluate xattrs which may have opaque value set
attr, err := fsEval.Lgetxattr(fullPath, "user.overlay.opaque")
if err != nil {
v := errors.Cause(err)
if !errors.Is(err, os.ErrNotExist) && v != unix.EOPNOTSUPP && v != unix.ENODATA && v != unix.EPERM {
return false, errors.Errorf("[internal error] unknown stat info type %T", info.Sys())
if !errors.Is(err, os.ErrNotExist) &&
!errors.Is(err, syscall.EOPNOTSUPP) &&
!errors.Is(err, syscall.ENODATA) &&
!errors.Is(err, syscall.EACCES) &&
!errors.Is(err, syscall.EPERM) {
return false, errors.Errorf("[internal error] %v unknown stat info type %T", err, info.Sys())
}

return false, nil
Expand Down

0 comments on commit 60783be

Please sign in to comment.