From a22bce8aabcbb1d944cbcc348f846ef41db3431d Mon Sep 17 00:00:00 2001 From: Craig MacKenzie Date: Tue, 14 Feb 2023 14:34:10 -0500 Subject: [PATCH] Add the file extension in unit diagnostics again. (#2270) Re-apply the changes from https://github.com/elastic/elastic-agent/pull/2047 again since they somehow got lost on main again. (cherry picked from commit 3bb605d13e1a2a1aa79981db022096068784cd09) --- internal/pkg/diagnostics/diagnostics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/diagnostics/diagnostics.go b/internal/pkg/diagnostics/diagnostics.go index 01103f9a1fd..985a860e24e 100644 --- a/internal/pkg/diagnostics/diagnostics.go +++ b/internal/pkg/diagnostics/diagnostics.go @@ -195,7 +195,7 @@ func ZipArchive(errOut, w io.Writer, agentDiag []client.DiagnosticFileResult, un continue } for _, fr := range ud.Results { - filePath := fmt.Sprintf("components/%s/%s/%s", dirName, unitDir, fr.Name) + filePath := fmt.Sprintf("components/%s/%s/%s", dirName, unitDir, fr.Filename) w, err := zw.CreateHeader(&zip.FileHeader{ Name: filePath, Method: zip.Deflate,