From 9b6a358e19fa09587fa173238fda2f0d04a51e02 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 16 Feb 2023 15:28:25 +0100 Subject: pkg/report: handle guilty file extraction for non-symbolized reports Currently we return ".", which is not really expected by all the surrounding logic. --- pkg/report/linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 06b372f09..320f5b148 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -735,10 +735,9 @@ func (ctx *linux) extractGuiltyFileImpl(report []byte) string { if matchesAny(file, ctx.guiltyFileIgnores) || ctx.guiltyLineIgnore.Match(scanner.Bytes()) { continue } - guilty = string(file) + guilty = filepath.Clean(string(file)) break } - guilty = filepath.Clean(guilty) // Search for deeper filepaths in the stack trace below the first possible guilty file. deepestPath := filepath.Dir(guilty) -- cgit mrf-deployment