From cdad238183e4aa62df16b2367321abf0f7a517c8 Mon Sep 17 00:00:00 2001 From: Blockhead Date: Mon, 18 Jan 2021 15:27:50 +0100 Subject: Fix serialisation: breach of contract, file left open Previous commit did not fix saving, but is kept because there is a corner case for which it is required (see MT forum) --- serialize.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/serialize.lua b/serialize.lua index a525e9e..12a26c4 100644 --- a/serialize.lua +++ b/serialize.lua @@ -190,6 +190,7 @@ local function write_to_fd(root_table, file, config) file:write("LUA_SER v=1\n") write_table(root_table, file, config) file:write("E\nEND_SER\n") + file:close() end -- Reads the file contents from the passed file descriptor and returns the table on success -- cgit v1.2.3