1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-05-11 21:30:22 +02:00

Remove backup code

This commit is contained in:
Jude Melton-Houghton 2022-08-13 12:32:01 -04:00
parent 659c9edac9
commit 5e85b61af2

View File

@ -71,17 +71,6 @@ local function read_tube_db()
local file_content = file:read("*all")
io.close(file)
pipeworks.logger("Moving teleport tube DB to mod storage from " .. filename)
local backup_filename = filename .. ".bak"
pipeworks.logger("Backing up old file as " .. backup_filename)
local backup_file = io.open(backup_filename, "r")
if backup_file then
io.close(backup_file)
error("Cannot back up teleport tube DB file " ..
"as a file already exists at " .. backup_filename)
end
assert(os.rename(filename, backup_filename))
if file_content and file_content ~= "" then
tp_tube_db = minetest.deserialize(file_content)
else