From 62bfb809c5835cb58b583b47bc86f7b6e2f1e3ff Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Mon, 26 Feb 2024 17:50:55 +0000 Subject: [PATCH] fix: consider only regular files to checksum Signed-off-by: Ramkumar Chinchani --- pkg/fs/fs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/fs/fs.go b/pkg/fs/fs.go index 12602f7..0e78e42 100644 --- a/pkg/fs/fs.go +++ b/pkg/fs/fs.go @@ -103,7 +103,8 @@ func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Packa return err } - if info.IsDir() { + // we compute checksums below, so consider only regular files + if !info.Mode().IsRegular() { return nil }