-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Take the following ZIP file structure, which consists of one file:
./dir
└── test.lua
If you try out the following code:
local miniz = require("miniz")
local reader = miniz.new_reader("dir.zip")
local stats = reader:stat(1) -- our only file in this central directory
assert(stats.index == 1)The above assertion will fail, because while lminiz accepts a 1-based index of the file, it internally subtracts one, and then never adds that one back to any output. This applies to errors too:

This issue is more of a question, @zhaozg is lminiz supposed to be transparent about the difference in index or is the current behavior the expected one?
Metadata
Metadata
Assignees
Labels
No labels