There is a bug in luasystem.cpp, in the function lua_dir(lua_State *L).
The following code is NOT the correct way of checking if a file is a directory:
lua_pushboolean(L, g_dir.d_stat.st_attr & FIO_SO_IFDIR);
Even if that works with memory sticks and flash devices, it fails with umd's.
The correct way to check if a file is adirectory is:
lua_pushboolean(L, FIO_S_ISDIR(g_dir.d_stat.st_mode));
(this is the bug that causes LuaFileManager to list umd directories as files, i hope this helps to solve that bug)
BUG: incorrect way of detecting if a file is a directory
Moderators: Shine, Insert_witty_name
Here i leave a precompiled binary of LuaPlayer-0.17dk2 with that bug solved.
http://rapidshare.de/files/17099461/EBOOT.PBP.html
To make Lua FileManager work properly with umd's, simply replace the EBOOT.PBP with that one.
http://rapidshare.de/files/17099461/EBOOT.PBP.html
To make Lua FileManager work properly with umd's, simply replace the EBOOT.PBP with that one.
Re: BUG: incorrect way of detecting if a file is a directory
Thanks, I've fixed this, will be in the next version.moonlight wrote:The correct way to check if a file is adirectory is:
lua_pushboolean(L, FIO_S_ISDIR(g_dir.d_stat.st_mode));
Great, thanks.moonlight wrote:Here i leave a precompiled binary of LuaPlayer-0.17dk2 with that bug solved.
http://rapidshare.de/files/17099461/EBOOT.PBP.html
To make Lua FileManager work properly with umd's, simply replace the EBOOT.PBP with that one.
I'll include this in the next release unless Shine updates LuaPlayer upstream.