From 989cb458a289427d0d8f92354329bbdbcc2f7c6d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 25 Feb 2016 22:36:42 +0100 Subject: util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632) --- util/datamanager.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'util/datamanager.lua') diff --git a/util/datamanager.lua b/util/datamanager.lua index a107d95c..c69ecd25 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -152,6 +152,7 @@ local function atomic_store(filename, data) if not ok then break end ok, msg = f:close(); + f = nil; -- no longer valid if not ok then break end return os_rename(scratch, filename); -- cgit v1.2.3