AP_Scripting: fixed remove call

need to use AP_Filesystem
This commit is contained in:
Andrew Tridgell 2024-07-09 08:30:21 +10:00
parent ffc78722f7
commit 7477c4e205
1 changed files with 1 additions and 1 deletions

View File

@ -862,7 +862,7 @@ int lua_dirlist(lua_State *L) {
int lua_removefile(lua_State *L) {
binding_argcheck(L, 1);
const char *filename = luaL_checkstring(L, 1);
return luaL_fileresult(L, remove(filename) == 0, filename);
return luaL_fileresult(L, AP::FS().unlink(filename) == 0, filename);
}
// Manual binding to allow SRV_Channels table to see safety state