Skip to content

Commit 090ffce

Browse files
committed
local: fix attestation filename
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent c51ecee commit 090ffce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

exporter/local/fs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func CreateFS(ctx context.Context, sessionID string, k string, ref cache.Immutab
180180
return nil, nil, err
181181
}
182182
stmtFS := staticfs.NewFS()
183-
split := opt.UsePlatformSplit(isMap)
183+
addPlatformToFilename := isMap && !opt.UsePlatformSplit(isMap)
184184

185185
names := map[string]struct{}{}
186186
for i, stmt := range stmts {
@@ -190,7 +190,7 @@ func CreateFS(ctx context.Context, sessionID string, k string, ref cache.Immutab
190190
}
191191

192192
name := opt.AttestationPrefix + path.Base(attestations[i].Path)
193-
if !split {
193+
if addPlatformToFilename {
194194
nameExt := path.Ext(name)
195195
namBase := strings.TrimSuffix(name, nameExt)
196196
name = fmt.Sprintf("%s.%s%s", namBase, strings.ReplaceAll(k, "/", "_"), nameExt)

0 commit comments

Comments
 (0)