From 49aaf3ec355f783507875381a426ea350f0cdea1 Mon Sep 17 00:00:00 2001 From: piernov Date: Mon, 2 May 2016 19:22:05 +0200 Subject: Fix delete save game Yep, it was called unlink(). Who would've thought of that? Also, let's use the right operator and not fall for Javascript's silliness --- inc/savegame.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/savegame.inc b/inc/savegame.inc index eb4134f..2f8c70a 100644 --- a/inc/savegame.inc +++ b/inc/savegame.inc @@ -74,7 +74,7 @@ function parseSave($xml, &$table) { // Passing $table by reference function deleteSave() { if(empty($_POST["filename"])) return; $filename = $_POST["filename"]; - if(rm_file(SAVEDIR + "/" + $filename)) sendError("gamesave_delete_failed"); // TODO: find the correct method for removing a fileā€¦ + if(unlink(SAVEDIR + "/" + $filename)) sendError("gamesave_delete_failed"); else sendInfo("gamesave_delete_success"); } -- cgit v1.2.3-70-g09d2