diff options
| author | Peter Melnichenko <mpeterval@gmail.com> | 2016-04-25 15:36:37 +0300 |
|---|---|---|
| committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-04-25 15:36:37 +0300 |
| commit | 655ec8baa3e1e2c3f0fc13845f9b3f86416ec944 (patch) | |
| tree | 9f7c3057a4f28030b25fefe05215f525cd04ce42 /src | |
| parent | 695def20efc462667bf73016df2195558540bf93 (diff) | |
| download | luafilesystem-655ec8baa3e1e2c3f0fc13845f9b3f86416ec944.tar.gz luafilesystem-655ec8baa3e1e2c3f0fc13845f9b3f86416ec944.tar.bz2 luafilesystem-655ec8baa3e1e2c3f0fc13845f9b3f86416ec944.zip | |
Use pusherror in lfs_g_setmode
Diffstat (limited to 'src')
| -rw-r--r-- | src/lfs.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -360,11 +360,7 @@ static int lfs_g_setmode (lua_State *L, FILE *f, int arg) { | |||
| 360 | lua_pushnil(L); | 360 | lua_pushnil(L); |
| 361 | return 2; | 361 | return 2; |
| 362 | } else { | 362 | } else { |
| 363 | int en = errno; | 363 | return pusherror(L, NULL); |
| 364 | lua_pushnil(L); | ||
| 365 | lua_pushfstring(L, "%s", strerror(en)); | ||
| 366 | lua_pushinteger(L, en); | ||
| 367 | return 3; | ||
| 368 | } | 364 | } |
| 369 | } | 365 | } |
| 370 | 366 | ||
