From 904ed246faa944097337037aba3a7fb4d7a1d48e Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Sun, 5 Nov 2023 10:47:02 +0100 Subject: [PATCH] fix: correct error mismatch causing race in fast walks --- pkg/fanal/artifact/local/fs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/fanal/artifact/local/fs.go b/pkg/fanal/artifact/local/fs.go index 2cd582fe1a9e..49d20fd14f95 100644 --- a/pkg/fanal/artifact/local/fs.go +++ b/pkg/fanal/artifact/local/fs.go @@ -154,7 +154,7 @@ func (a Artifact) Inspect(ctx context.Context) (types.ArtifactReference, error) } // Build filesystem for post analysis - if err = composite.CreateLink(analyzerTypes, dir, filePath, filepath.Join(dir, filePath)); err != nil { + if err := composite.CreateLink(analyzerTypes, dir, filePath, filepath.Join(dir, filePath)); err != nil { return xerrors.Errorf("failed to create link: %w", err) }