Skip to content

Commit

Permalink
exporter: fix file layer finder whiteout detection
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <[email protected]>
(cherry picked from commit 32dc0ec)
  • Loading branch information
jedevc authored and tonistiigi committed Feb 13, 2023
1 parent bfe0729 commit 2120078
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exporter/containerimage/attestations.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"fmt"
"io/fs"
"path/filepath"
"strings"

intoto "github.com/in-toto/in-toto-golang/in_toto"
Expand Down Expand Up @@ -192,7 +193,7 @@ func (c *fileLayerFinder) find(ctx context.Context, s session.Group, filename st
for _, f := range files {
f = filepath.Join("/", f)

if strings.HasPrefix(f, ".wh.") {
if strings.HasPrefix(filepath.Base(f), ".wh.") {
// skip whiteout files, we only care about file creations
continue
}
Expand Down

0 comments on commit 2120078

Please sign in to comment.