diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-install.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua index eba8dd5c9..1c9c29f71 100644 --- a/scripts/context/lua/mtx-install.lua +++ b/scripts/context/lua/mtx-install.lua @@ -152,11 +152,16 @@ function install.identify() local name = files[i] local size = filesize(name) local base = gsub(name,pattern,"") - local stamp = hashdata(io.loaddata(name)) - details[i] = { base, size, stamp } - total = total + size + local data = io.loaddata(name) + if data and #data > 0 then + local stamp = hashdata(data) + details[i] = { base, size, stamp } + total = total + size + else + report("%-24s : bad file %a",tree,name) + end end - report("%-20s : %4i files, %3.0f MB",tree,#files,total/(1000*1000)) + report("%-24s : %4i files, %3.0f MB",tree,#files,total/(1000*1000)) savetable(path .. ".tma",details) |