[Dev-luatex] Opening files in safer mode

luigi scarso luigi.scarso at gmail.com
Wed Oct 24 00:43:14 CEST 2018


On Tue, Oct 23, 2018 at 11:44 PM Marcel Kr├╝ger <tex at 2krueger.de> wrote:

> Hi,
>
> I think there is a bug in `io.open` in --safer mode:
>
>     \directlua{
>       io.open(tex.jobname .. '.tex'):close()
>     }
>     \bye
>
> If this document is run with `luatex --safer` it leads to `bad argument #1
> to 'gsub' (string expected, got nil)`.
>
> The problem is a missing `not` in luatex-core.lua, function
> luatex_io_open_readonly:
> The default argument 'r' is used if an explicit argument is given and when
> no "how" argument
> is given it tries to interpret the non existing argument.
>
hm this is tricky.. we have to check it carefully,
these "safer" modes are  quite complicated things.

-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/dev-luatex/attachments/20181024/ee8992a1/attachment.html>


More information about the dev-luatex mailing list