summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-11-19 11:48:53 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-11-19 11:48:53 +0100
commit4b089e589d39346a66a27d04f9857fe16e4b7b41 (patch)
treeab037efa5ee53d50a777454a9cf310fba470e401 /scripts
parent5c3cfe6a56aafb26c7fc6e3aaccec7acec9b621a (diff)
downloadcontext-4b089e589d39346a66a27d04f9857fe16e4b7b41.tar.gz
2020-11-19 11:26:00
Diffstat (limited to 'scripts')
-rw-r--r--scripts/context/lua/mtx-install.lua13
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)