Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit 7753a9c

Browse files
authored
Merge pull request #172 from readium/fix/zip
Fix regression when reading ZIP entries
2 parents baa857f + fda8585 commit 7753a9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

r2-streamer-swift/Toolkit/ZIPArchive/ZIPArchive.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ internal class ZipArchive: Loggable {
227227
/// - Parameter x: The number of bytes to advance the current offset to.
228228
internal func seek(_ offset: Int) throws {
229229
let isCompressed = try informationsOfCurrentFile().isCompressed
230-
if isCompressed {
230+
// FIXME: https://github.com/readium/r2-shared-swift/issues/98
231+
if true || isCompressed {
231232
// Deflate is stream-based, so we need to read the bytes from the beginning and discard
232233
// them until we reach the offset.
233234
let ioffset = Int(offset)

0 commit comments

Comments
 (0)