diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-04 15:38:34 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-05-05 12:12:07 +0300 |
commit | 1937ba848b275408e837fb49dc8a83eca6a031fe (patch) | |
tree | 1cb4190d0e492dc64c7a0a1f925ad54f79f137e8 | |
parent | 732f9e93091b7c7889d739696aed15ac1a57fde5 (diff) | |
download | luafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.tar.gz luafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.tar.bz2 luafilesystem-1937ba848b275408e837fb49dc8a83eca6a031fe.zip |
Include strerror(errno) into error message in lfs.attributes
-rw-r--r-- | src/lfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)) { |