Skip to content

Commit

Permalink
0.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
guzba committed Dec 7, 2022
1 parent 9d5f063 commit 7628a30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/zippy/ziparchives.nim
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,14 @@ proc openZipArchive*(
# exe). This handles that by determining where the zip archive is from
# the start of the file.
let
socd = result.findStartOfCentralDirectory(eocd, numCentralDirectoryRecords)
socd =
try:
# Try to find the start relative to the end of the file, supporting
# zip archives being concatenated to the end. If this fails for any
# reason, fall back to the default behavior.
result.findStartOfCentralDirectory(eocd, numCentralDirectoryRecords)
except ZippyError:
centralDirectoryStart
socdOffset = socd - centralDirectoryStart

var pos = socdOffset + centralDirectoryStart
Expand Down
2 changes: 1 addition & 1 deletion zippy.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.10.4"
version = "0.10.5"
author = "Ryan Oldenburg"
description = "Pure Nim implementation of deflate, zlib, gzip and zip."
license = "MIT"
Expand Down

0 comments on commit 7628a30

Please sign in to comment.