diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-01-06 20:05:31 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-01-06 20:05:31 +0100 |
commit | 40c16033d164a969e06aacc991371592731baf2a (patch) | |
tree | d74d6ccd0713b41105b83b1410d27915c7b68649 /tex/context/base/mkxl/util-fil.lmt | |
parent | 9b1c3470a7a222ef9ae20106d750c4a0127819a7 (diff) | |
download | context-40c16033d164a969e06aacc991371592731baf2a.tar.gz |
2022-01-06 19:50:00
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 |