From c09020c2fb01da24d5befbed78ce3b73b5efbe4c Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 23:39:37 +0200 Subject: content tests are three-valued: unknown when unreadable or read in part --- internal/extract/zipxml.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/extract/zipxml.go') diff --git a/internal/extract/zipxml.go b/internal/extract/zipxml.go index 1b3ba82..3b59d3a 100644 --- a/internal/extract/zipxml.go +++ b/internal/extract/zipxml.go @@ -102,8 +102,11 @@ func zipText(ctx context.Context, path, ext string, maxRead int64) (string, erro } b.WriteByte('\n') } - if !wroteText && firstErr != nil { - return "", firstErr + if firstErr != nil { + if !wroteText { + return "", firstErr + } + return b.String(), fmt.Errorf("%w: %w", ErrPartial, firstErr) } return b.String(), nil } -- cgit v1.3