diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lfs.c | 8 |
1 files changed, 1 insertions, 7 deletions
| @@ -429,13 +429,7 @@ static int make_link (lua_State *L) { | |||
| 429 | #ifndef _WIN32 | 429 | #ifndef _WIN32 |
| 430 | const char *oldpath = luaL_checkstring(L, 1); | 430 | const char *oldpath = luaL_checkstring(L, 1); |
| 431 | const char *newpath = luaL_checkstring(L, 2); | 431 | const char *newpath = luaL_checkstring(L, 2); |
| 432 | int res = (lua_toboolean(L,3) ? symlink : link)(oldpath, newpath); | 432 | return pushresult(L, (lua_toboolean(L, 3) ? symlink : link)(oldpath, newpath), NULL); |
| 433 | if (res == -1) { | ||
| 434 | return pusherror(L, NULL); | ||
| 435 | } else { | ||
| 436 | lua_pushinteger(L, 0); | ||
| 437 | return 1; | ||
| 438 | } | ||
| 439 | #else | 433 | #else |
| 440 | errno = ENOSYS; /* = "Function not implemented" */ | 434 | errno = ENOSYS; /* = "Function not implemented" */ |
| 441 | return pushresult(L, -1, "make_link is not supported on Windows"); | 435 | return pushresult(L, -1, "make_link is not supported on Windows"); |
