os.remove remove can remove dirs now

This commit is contained in:
2025-08-02 16:30:36 -03:00
parent 6708f705ee
commit 359f2838a3

View File

@@ -199,7 +199,7 @@ func SafeRemove(L *lua.LState) int {
L.Push(lua.LString("[packets] unsafe filepath"))
return 2
}
err := os.Remove(filename)
err := os.RemoveAll(filename)
if err != nil {
L.Push(lua.LFalse)
L.Push(lua.LString("[packets] remove failed\n" + err.Error()))