aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-02 19:22:05 +0200
committerpiernov <piernov@piernov.org>2016-05-02 19:22:05 +0200
commit49aaf3ec355f783507875381a426ea350f0cdea1 (patch)
treeaa62d704f65047e4dcc36a8d2de07fbcd277edba /inc
parent0b72114561a685b247922a93c576edabd4d3b09e (diff)
downloadcandybox-49aaf3ec355f783507875381a426ea350f0cdea1.tar.gz
candybox-49aaf3ec355f783507875381a426ea350f0cdea1.tar.bz2
candybox-49aaf3ec355f783507875381a426ea350f0cdea1.tar.xz
candybox-49aaf3ec355f783507875381a426ea350f0cdea1.zip
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
Diffstat (limited to 'inc')
-rw-r--r--inc/savegame.inc2
1 files changed, 1 insertions, 1 deletions
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");
}