lua-users home
lua-l archive

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

> The problem is, the 'app/geresim/prerock/lua' directory contains both a 
> 'corr' directory and a 'corr.lua' file.

What is your package.path?

> The problem is, apparently fopen succeeds when trying to open a
> directory but later on, when the file is actually fread from, this
> error happens. I changed 'readable' so that it will fail if reading
> from the file fails:

That should work in modern Unix systems. luaL_loadfile has similar code.
In old Unix systems, directories could be read like ordinary files.
(Ah, the good old days...)