From 7477c4e2051b86f205f0f43f9bb7b387af6f40a1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 9 Jul 2024 08:30:21 +1000 Subject: [PATCH] AP_Scripting: fixed remove call need to use AP_Filesystem --- libraries/AP_Scripting/lua_bindings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Scripting/lua_bindings.cpp b/libraries/AP_Scripting/lua_bindings.cpp index 82ba42fbef..c42f5ac18e 100644 --- a/libraries/AP_Scripting/lua_bindings.cpp +++ b/libraries/AP_Scripting/lua_bindings.cpp @@ -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