Skip to content

Commit 4c6c55c

Browse files
committed
ProxyReader needs to implement io.Seeker for unpacking zip archives.
1 parent c5ae974 commit 4c6c55c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/proxyreader/proxyreader.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ func (pr *ProxyReader) ReadAt(p []byte, offset int64) (int, error) {
5252
}
5353
return n, err
5454
}
55+
56+
func (pr *ProxyReader) Seek(offset int64, whence int) (int64, error) {
57+
seekAt, ok := pr.r.(io.Seeker)
58+
if !ok {
59+
return 0, errs.New("This proxied reader needs to implement io.Seeker")
60+
}
61+
return seekAt.Seek(offset, whence)
62+
}

0 commit comments

Comments
 (0)