lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>> package.path is used by require but not by luaL_loadfile and luaL_dofile,
>>
>
> Is there is any alternate way of making luaL_loadfile & luaL_dofile enforce
> relative path-names ?
>

You can do some string manipulation on package.path/package.cpath and
use them as a search path for relative-path given filenames.  It's
definitely easier to write this in Lua, but totally doable in C.

wes