From 1937ba848b275408e837fb49dc8a83eca6a031fe Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Wed, 4 May 2016 15:38:34 +0300 Subject: Include strerror(errno) into error message in lfs.attributes --- src/lfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lfs.c b/src/lfs.c index 3c70d8e..2b85d30 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -811,8 +811,8 @@ static int _file_info_ (lua_State *L, int (*st)(const char*, STAT_STRUCT*)) { int i; if (st(file, &info)) { - lua_pushnil (L); - lua_pushfstring (L, "cannot obtain information from file `%s'", file); + lua_pushnil(L); + lua_pushfstring(L, "cannot obtain information from file '%s': %s", file, strerror(errno)); return 2; } if (lua_isstring (L, 2)) { -- cgit v1.2.3-55-g6feb