Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keplerproject/luafilesystem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-05-04 15:38:34 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-05-05 12:12:07 +0300
commit1937ba848b275408e837fb49dc8a83eca6a031fe (patch)
tree1cb4190d0e492dc64c7a0a1f925ad54f79f137e8
parent732f9e93091b7c7889d739696aed15ac1a57fde5 (diff)
Include strerror(errno) into error message in lfs.attributes
-rw-r--r--src/lfs.c4
1 files 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)) {