mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-24 12:23:08 +00:00
Include strerror(errno) into error message in lfs.attributes
This commit is contained in:
@@ -811,8 +811,8 @@ static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (st(file, &info)) {
|
if (st(file, &info)) {
|
||||||
lua_pushnil (L);
|
lua_pushnil(L);
|
||||||
lua_pushfstring (L, "cannot obtain information from file `%s'", file);
|
lua_pushfstring(L, "cannot obtain information from file '%s': %s", file, strerror(errno));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (lua_isstring (L, 2)) {
|
if (lua_isstring (L, 2)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user