Skip to content

Commit

Permalink
AP_Scripting: fixed remove call
Browse files Browse the repository at this point in the history
need to use AP_Filesystem
  • Loading branch information
tridge committed Jul 10, 2024
1 parent ffc7872 commit 7477c4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_Scripting/lua_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7477c4e

Please sign in to comment.