From f2187b23c1c1723cb50da85799c81bcd649a3b9a Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Mon, 20 Sep 2010 18:41:33 +0000
Subject: [PATCH] Fix savefile re-saving

git-svn-id: http://svn.net-core.org/repos/t-engine4@1255 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/engines/default/engine/Savefile.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/game/engines/default/engine/Savefile.lua b/game/engines/default/engine/Savefile.lua
index 2b2bb8863e..7a9ae2e55b 100644
--- a/game/engines/default/engine/Savefile.lua
+++ b/game/engines/default/engine/Savefile.lua
@@ -138,7 +138,7 @@ function _M:saveWorld(world, no_dialog)
 	local zip = fs.zipOpen(self.save_dir..self:nameSaveWorld(world)..".tmp")
 	self:saveObject(world, zip)
 	zip:close()
-	fs.delete(self.save_dir..self:nameSaveLevel(level))
+	fs.delete(self.save_dir..self:nameSaveWorld(world))
 	fs.rename(self.save_dir..self:nameSaveWorld(world)..".tmp", self.save_dir..self:nameSaveWorld(world))
 
 	if not no_dialog then game:unregisterDialog(popup) end
@@ -197,7 +197,7 @@ function _M:saveGame(game, no_dialog)
 	local zip = fs.zipOpen(self.save_dir..self:nameSaveGame(game)..".tmp")
 	self:saveObject(game, zip)
 	zip:close()
-	fs.delete(self.save_dir..self:nameSaveLevel(level))
+	fs.delete(self.save_dir..self:nameSaveGame(game))
 	fs.rename(self.save_dir..self:nameSaveGame(game)..".tmp", self.save_dir..self:nameSaveGame(game))
 
 	local desc = game:getSaveDescription()
@@ -233,7 +233,7 @@ function _M:saveZone(zone, no_dialog)
 	local zip = fs.zipOpen(self.save_dir..self:nameSaveZone(zone)..".tmp")
 	self:saveObject(zone, zip)
 	zip:close()
-	fs.delete(self.save_dir..self:nameSaveLevel(level))
+	fs.delete(self.save_dir..self:nameSaveZone(zone))
 	fs.rename(self.save_dir..self:nameSaveZone(zone)..".tmp", self.save_dir..self:nameSaveZone(zone))
 
 	if not no_dialog then game:unregisterDialog(popup) end
-- 
GitLab