Skip to content

Commit

Permalink
fix: handle missing files
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha committed Apr 11, 2024
1 parent 9a3eb8f commit f033fcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Packa
kfile := k8spdx.NewFile()
kfile.SetEntity(
&k8spdx.Entity{
Name: path,
Name: filepath.Join(path, info.Name()),
Checksum: map[string]string{
"SHA1": hex.EncodeToString(cksumSHA1[:]),
"SHA256": hex.EncodeToString(cksumSHA256[:]),
Expand Down
2 changes: 1 addition & 1 deletion pkg/fs/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func checkBOM(input, pathEntry string) error {
for _, file := range pkg.Files() {
symlink, err := filepath.EvalSymlinks(file.Name)
if err != nil {
log.Error().Err(err).Str("path", file.Name).Msg("unable to resolve symlink")
log.Error().Err(err).Str("path", file.Name).Str("package", pkg.Name).Msg("unable to resolve symlink")

return err
}
Expand Down

0 comments on commit f033fcf

Please sign in to comment.