Skip to content

Commit 59929f4

Browse files
committed
kepub: Document archive/zip usage in Convert more clearly
1 parent 60c0188 commit 59929f4

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

kepub/convert.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ import (
1818
)
1919

2020
// Convert converts the EPUB root r into a new EPUB written to w. If r is a
21-
// (*zip.Reader), the original zip metadata is preserved where possible, and
22-
// additional optimizations are applied to prevent re-compressing unchanged
23-
// data where possible. If processing untrusted EPUBs, r should not point to an
24-
// unrestricted on-disk filesystem since paths are not sanitized; it should
25-
// point to a (*zip.Reader) or other in-memory or synthetic filesystem.
21+
// (*zip.Reader) (from archive/zip by default, or from
22+
// github.com/pgaskin/kepubify/_/go116-zip.go117/archive/zip if the zip117 build
23+
// tag is used (even on Go 1.17)), the original zip metadata is preserved where
24+
// possible, and additional optimizations are applied to prevent re-compressing
25+
// unchanged data where possible. If processing untrusted EPUBs, r should not
26+
// point to an unrestricted on-disk filesystem since paths are not sanitized; it
27+
// should point to a (*zip.Reader) or other in-memory or synthetic filesystem.
2628
func (c *Converter) Convert(ctx context.Context, w io.Writer, r fs.FS) error {
2729
type FileAction int
2830
const (

0 commit comments

Comments
 (0)