mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Update Lua to 5.4.7
This commit is contained in:
parent
f4f5cba43d
commit
58ef6f6dac
30 changed files with 365 additions and 255 deletions
|
|
@ -155,6 +155,7 @@ static int os_execute (lua_State *L) {
|
|||
|
||||
static int os_remove (lua_State *L) {
|
||||
const char *filename = luaL_checkstring(L, 1);
|
||||
errno = 0;
|
||||
return luaL_fileresult(L, remove(filename) == 0, filename);
|
||||
}
|
||||
|
||||
|
|
@ -162,6 +163,7 @@ static int os_remove (lua_State *L) {
|
|||
static int os_rename (lua_State *L) {
|
||||
const char *fromname = luaL_checkstring(L, 1);
|
||||
const char *toname = luaL_checkstring(L, 2);
|
||||
errno = 0;
|
||||
return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue