From 7ff3dd0311389ad43ff95d91e64fc474c277345e Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Wed, 27 Nov 2024 22:55:15 +0100 Subject: [PATCH] clean close of file after reading --- smartfs.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/smartfs.lua b/smartfs.lua index 8ddb3c7..1d78dfc 100644 --- a/smartfs.lua +++ b/smartfs.lua @@ -144,6 +144,7 @@ function smartfs._makeState_(form, player, params, is_inv) local file = io.open(file_name, "r") if file then local table = core.deserialize(file:read("*all")) + file:close() if type(table) == "table" then if table.size then self._size = table.size