mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-24 20:33:06 +00:00
Use pusherror in lfs_g_setmode
This commit is contained in:
@@ -360,11 +360,7 @@ static int lfs_g_setmode (lua_State *L, FILE *f, int arg) {
|
|||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 2;
|
return 2;
|
||||||
} else {
|
} else {
|
||||||
int en = errno;
|
return pusherror(L, NULL);
|
||||||
lua_pushnil(L);
|
|
||||||
lua_pushfstring(L, "%s", strerror(en));
|
|
||||||
lua_pushinteger(L, en);
|
|
||||||
return 3;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user