[dev-context] --iftouched not working

Hans Hagen pragma at wxs.nl
Thu Jun 16 13:12:58 CEST 2011


On 16-6-2011 12:01, Aditya Mahajan wrote:
> Hi,
>
> mtxrun --iftouched does not work. The reason is that line 147000 of
> mtxrun.lua has
>
> local oldname, newname = string.split(touchname, ",")
>
> This sets oldname to be equal to a table and newname to nil.
> Consequently, the next test
>
> if oldname and newname and oldname ~= "" and newname ~= "" then
>
> fails. An easy fix is to wrap string.split inside a unpack.
>
> local oldname, newname = unwrap(string.split(touchname, ","))
>
> but there might be more canonical ways of fixing this.

I've made a string.splitup(str,",") for this (saves a temp table).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-context mailing list