aboutsummaryrefslogtreecommitdiff
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)
downloadluafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.tar.gz
luafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.tar.bz2
luafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.zip
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*)) {
811 int i; 811 int i;
812 812
813 if (st(file, &info)) { 813 if (st(file, &info)) {
814 lua_pushnil (L); 814 lua_pushnil(L);
815 lua_pushfstring (L, "cannot obtain information from file `%s'", file); 815 lua_pushfstring(L, "cannot obtain information from file '%s': %s", file, strerror(errno));
816 return 2; 816 return 2;
817 } 817 }
818 if (lua_isstring (L, 2)) { 818 if (lua_isstring (L, 2)) {