mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-25 13:13:07 +00:00
Return errno from lfs.attributes on error
This commit is contained in:
@@ -800,7 +800,8 @@ static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) {
|
|||||||
if (st(file, &info)) {
|
if (st(file, &info)) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushfstring(L, "cannot obtain information from file '%s': %s", file, strerror(errno));
|
lua_pushfstring(L, "cannot obtain information from file '%s': %s", file, strerror(errno));
|
||||||
return 2;
|
lua_pushinteger(L, errno);
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
if (lua_isstring (L, 2)) {
|
if (lua_isstring (L, 2)) {
|
||||||
const char *member = lua_tostring (L, 2);
|
const char *member = lua_tostring (L, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user