mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
Update Lua to 5.4.7
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user