diff options
Diffstat (limited to 'tex/context/base/mkxl/util-fil.lmt')
-rw-r--r-- | tex/context/base/mkxl/util-fil.lmt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tex/context/base/mkxl/util-fil.lmt b/tex/context/base/mkxl/util-fil.lmt index 86200ebe5..b8d374755 100644 --- a/tex/context/base/mkxl/util-fil.lmt +++ b/tex/context/base/mkxl/util-fil.lmt @@ -27,15 +27,21 @@ function files.open(filename,zb) end function files.close(f) - zerobased[f] = nil - f:close() + if f then + zerobased[f] = nil + f:close() + end end function files.size(f) - local current = f:seek() - local size = f:seek("end") - f:seek("set",current) - return size + if f then + local current = f:seek() + local size = f:seek("end") + f:seek("set",current) + return size + else + return 0 + end end files.getsize = files.size |