From ab38c4249713f2b11f8e44b98aeb985ff7582ffa Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 28 Nov 2026 15:51:26 +0100 Subject: [PATCH] archiver: fix double path injection after quoting --- internal/archiver/archiver.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/archiver/archiver.go b/internal/archiver/archiver.go index 4d2292ed4..0e4ba978b 100644 --- a/internal/archiver/archiver.go +++ b/internal/archiver/archiver.go @@ -7,6 +7,7 @@ import ( "path" "runtime" "sort" + "strconv" "strings" "sync" "time" @@ -203,8 +204,9 @@ func (arch *Archiver) error(item string, err error) error { } // not all errors include the filepath, thus add it if it is missing - if !strings.Contains(err.Error(), item) { - err = fmt.Errorf("%v: %w", item, err) + // errors include quoted file path, so we need to quote it too + if !strings.Contains(err.Error(), item) && !strings.Contains(err.Error(), strconv.Quote(item)) { + err = fmt.Errorf("%q: %w", item, err) } errf := arch.Error(item, err)