Diff

util/datamanager.lua @ 7200:67ac4a0b6e50

util.datamanager: Unreference file handle after closing it to prevent trying to close it again (fixes #632)
author Kim Alvefur <zash@zash.se>
date Thu, 25 Feb 2016 22:36:42 +0100
parent 6681:0217a04722c7
child 7201:7a8cffafeff0
line wrap: on
line diff
--- a/util/datamanager.lua	Wed Jan 27 13:05:58 2016 +0000
+++ b/util/datamanager.lua	Thu Feb 25 22:36:42 2016 +0100
@@ -152,6 +152,7 @@
 		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);