1
0
mirror of https://github.com/pandorabox-io/banners.git synced 2025-01-06 16:10:32 +01:00

clean close of file after reading

This commit is contained in:
Luke aka SwissalpS 2024-11-27 22:55:15 +01:00
parent ae679a14d4
commit 7ff3dd0311

View File

@ -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