From 1800af4813ce423616d81eea8c0325e93d39e272 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Mon, 15 Apr 2024 18:41:58 +0000 Subject: [PATCH] add --- pkg/fs/verify.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/fs/verify.go b/pkg/fs/verify.go index cf65792..3ffd706 100644 --- a/pkg/fs/verify.go +++ b/pkg/fs/verify.go @@ -32,21 +32,21 @@ func checkBOM(input, pathEntry string) error { for _, pkg := range doc.Packages { for _, file := range pkg.Files() { - symlink, err := filepath.EvalSymlinks(file.Name) + symlink, err := filepath.EvalSymlinks(file.FileName) if err != nil { - log.Error().Err(err).Str("path", file.Name).Str("package", pkg.Name).Msg("unable to resolve symlink") + log.Error().Err(err).Str("path", file.FileName).Str("package", pkg.Name).Msg("unable to resolve symlink") return err } - if file.Name != pathEntry && symlink != pathEntry { + if file.FileName != pathEntry && symlink != pathEntry { continue } file.Entity.Opts = &spdx.ObjectOptions{} - if err := file.ReadSourceFile(file.Name); err != nil { - log.Error().Err(err).Str("path", file.Name).Msg("doesn't match entry in SBOM document") + if err := file.ReadSourceFile(file.FileName); err != nil { + log.Error().Err(err).Str("path", file.FileName).Msg("doesn't match entry in SBOM document") return err } @@ -58,9 +58,9 @@ func checkBOM(input, pathEntry string) error { } for _, file := range doc.Files { - symlink, err := filepath.EvalSymlinks(file.Name) + symlink, err := filepath.EvalSymlinks(file.FileName) if err != nil { - log.Error().Err(err).Str("path", file.Name).Msg("unable to resolve symlink") + log.Error().Err(err).Str("path", file.FileName).Msg("unable to resolve symlink") return err }