diff options
author | piernov <piernov@piernov.org> | 2016-05-02 19:22:05 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2016-05-02 19:22:05 +0200 |
commit | 49aaf3ec355f783507875381a426ea350f0cdea1 (patch) | |
tree | aa62d704f65047e4dcc36a8d2de07fbcd277edba /inc/savegame.inc | |
parent | 0b72114561a685b247922a93c576edabd4d3b09e (diff) | |
download | candybox-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/savegame.inc')
-rw-r--r-- | inc/savegame.inc | 2 |
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"); } |