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

Commit

Permalink
Merge pull request #172 from readium/fix/zip
Browse files Browse the repository at this point in the history
Fix regression when reading ZIP entries
  • Loading branch information
mickael-menu authored Jul 27, 2020
2 parents baa857f + fda8585 commit 7753a9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r2-streamer-swift/Toolkit/ZIPArchive/ZIPArchive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ internal class ZipArchive: Loggable {
/// - Parameter x: The number of bytes to advance the current offset to.
internal func seek(_ offset: Int) throws {
let isCompressed = try informationsOfCurrentFile().isCompressed
if isCompressed {
// FIXME: https://github.com/readium/r2-shared-swift/issues/98
if true || isCompressed {
// Deflate is stream-based, so we need to read the bytes from the beginning and discard
// them until we reach the offset.
let ioffset = Int(offset)
Expand Down

0 comments on commit 7753a9c

Please sign in to comment.