lua-users home
lua-l archive

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


On Thu, May 20, 2010 at 6:34 PM, Gilles Ganault <gilles.ganault@free.fr> wrote:
> ==========
> CreateFile
> C:\Program Files\Lua\5.1\rocks\wsapi\1.3.4-1\samples\lfs.lua
> NAME NOT FOUND
> C:\Program Files\Lua\5.1\rocks\wsapi\1.3.4-1\samples\socket\core.lua
> PATH NOT FOUND
...
> C:\Program Files\Lua\5.1\rocks\wsapi\1.3.4-1\samples\socket\core.lua
> PATH NOT FOUND
> ==========

This makes sense if you consider how require() works. First it uses
the package.path pattern to find Lua modules, and _if that fails_,
look for binary modules using the package.cpath pattern. So it can't
find 'lfs.lua', but then successfully finds 'lfs.dll', and likewise
for the LuaSocket DLLs.