Skip to content

Commit 090ffce

Browse files
committed
local: fix attestation filename
Signed-off-by: CrazyMax <[email protected]>
1 parent c51ecee commit 090ffce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)