pkgfs now stores absolute paths to archive files, oops

This commit is contained in:
Izaya 2020-06-05 12:33:03 +10:00
parent 0f1b324cc4
commit ffc6c8915a

View File

@ -99,7 +99,10 @@ function pkgfs.component.close(handle)
end
function pkgfs.add(fname,comp)
local fname = "/"..fnormalize(os.getenv("PWD").."/"..fname)
local f = fopen(fname,comp)
if not fname then error("unable to open file") end
print(fname)
for name, read, fsize in mtar.iter(f) do
findex[fnormalize(name)] = {fname,comp}
end