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:
parent
ae679a14d4
commit
7ff3dd0311
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user