-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcall_find_eocd.lua
More file actions
30 lines (28 loc) · 1.1 KB
/
call_find_eocd.lua
File metadata and controls
30 lines (28 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- call_find_eocd.lua
-- Minimal helper: call find_eocd_and_zip64 on repo-relative dbg.zip
local sep = package.config:sub(1,1)
local src = debug.getinfo(1, 'S').source or ''
local dir = src:match('@?(.*[\\/])') or './'
dir = dir:gsub('[\\/]+$', '')
local base = dir
pcall(function() dofile(base .. sep .. 'test.lua') end)
local path = base .. sep .. 'dbg.zip'
local f = io.open(path, 'rb')
if not f then print('dbg.zip not found in repo root'); return end
local res = find_eocd_and_zip64(f)
for k,v in pairs(res or {}) do print(k,v) end
-- call_find_eocd.lua
-- Minimal helper: call find_eocd_and_zip64 on repo-relative dbg.zip
local sep = package.config:sub(1,1)
local src = debug.getinfo(1, 'S').source or ''
local dir = src:match('@?(.*[\\/])') or './'
dir = dir:gsub('[\\/]+$', '')
local base = dir
pcall(function() dofile(base .. sep .. 'test.lua') end)
local path = base .. sep .. 'dbg.zip'
local f = io.open(path, 'rb')
if not f then print('dbg.zip not found in repo root'); return end
local res = find_eocd_and_zip64(f)
for k,v in pairs(res or {}) do print(k,v) end
f:close()
local res = find_eocd_and_zip64(f)