Skip to content

Commit

Permalink
Merge pull request #995 from jonjohnsonjr/leading-slash
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh authored Dec 20, 2023
2 parents e5f7af4 + 79511f1 commit 9ad04bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sbom/generator/spdx/spdx.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ func copySBOMElements(sourceDoc, targetDoc *Document, todo map[string]struct{},

done[f.ID] = struct{}{}

f.Name = strings.TrimPrefix(f.Name, "/") // Strip leading slashes, which SPDX doesn't like.

if _, ok := ownedFiles[f.Name]; !ok {
continue
}

f.Name = strings.TrimPrefix(f.Name, "/") // Strip leading slashes, which SPDX doesn't like.

targetDoc.Files = append(targetDoc.Files, f)
}

Expand Down

0 comments on commit 9ad04bd

Please sign in to comment.