[Dev-luatex] platform specific functionality

Taco Hoekwater taco at elvenkind.com
Mon Mar 15 16:54:25 CET 2010

T T wrote:
> On 15 March 2010 12:03, Taco Hoekwater <taco at elvenkind.com> wrote:
>> Oh, alright then. Patch applied (#3494)
> Thanks. One more patch for your consideration for something I needed
> recently: getting absolute, canonical file paths. In principle this
> can be implemented in pure Lua with the current lfs module, but
> getting all the corner cases right (e.g. foo/bar/./../baz) is not so
> easy. Perhaps having a convenience function for this is not such a bad
> idea (and using proper system APIs will guarantee that the result is
> correct).
> There is no Unix counterpart in the patch, because I didn't know how
> to implement it (with a call to realpath?) and I would have no way to
> test it anyway.

My man page for realpath(3) says:

   Avoid using this function. Its is broken by design

But it does not offer an alternate solution.

Looks like it would need private code, which is not a lot of fun to
write (unless there is something in kpathsea?).

More information about the dev-luatex mailing list