Skip to content

Commit

Permalink
Merge pull request #76 from guzba/ryan
Browse files Browse the repository at this point in the history
small improvement
  • Loading branch information
guzba authored Apr 18, 2024
2 parents 007f703 + c4ebeb7 commit a35acbd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/zippy/ziparchives.nim
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,11 @@ when (NimMajor, NimMinor, NimPatch) >= (1, 6, 0):
compressionMethod: uint16
uncompressedCrc32: uint32

var records: seq[(string, ArchiveEntry)]
for fileName in toSeq(entries.keys): # The entries table is modified so use toSeq
var
keys = toSeq(entries.keys) # The entries table is modified so use toSeq
records: seq[(string, ArchiveEntry)]
while keys.len > 0:
let fileName = keys.pop()
if fileName == "":
raise newException(ZippyError, "Invalid empty file name")
if fileName[0] == '/':
Expand Down

0 comments on commit a35acbd

Please sign in to comment.