lua-users home
lua-l archive

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


On Wed, Apr 30, 2014 at 12:22 PM, Igor Trevisan <igt1972@gmail.com> wrote:
> I added:
>
> package.path = "0:"
>
> at the beginning of each file because the USB stick root, where the files
> are stored, is seen as "0:".

First point is that you can set package.path within your Lua state, no
need to put it into each file.

Second, it should be package.path = "0:?.lua"  because this variable
is a set of _patterns_ that Lua will use, substituting the module name
for ? each time.