aboutsummaryrefslogtreecommitdiff
path: root/internal/extract/zipxml.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/extract/zipxml.go')
-rw-r--r--internal/extract/zipxml.go7
1 files changed, 5 insertions, 2 deletions
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
}