From 5cd93db24abc9a4b4a4eae6e38dbc71113be02f0 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Thu, 9 Nov 2023 09:33:13 +0100 Subject: [PATCH] fix: use slash separated paths for RPM files --- pkg/fanal/analyzer/pkg/rpm/rpm.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/fanal/analyzer/pkg/rpm/rpm.go b/pkg/fanal/analyzer/pkg/rpm/rpm.go index 21c8f50c93e5..2abf79bd2a53 100644 --- a/pkg/fanal/analyzer/pkg/rpm/rpm.go +++ b/pkg/fanal/analyzer/pkg/rpm/rpm.go @@ -129,6 +129,10 @@ func (a rpmPkgAnalyzer) parsePkgInfo(rc io.Reader) (types.Packages, []string, er if err != nil { return nil, nil, xerrors.Errorf("unable to get installed files: %w", err) } + + for i, file := range files { + files[i] = filepath.ToSlash(file) + } } // RPM DB uses MD5 digest