mirror of
https://github.com/pandorabox-io/banners.git
synced 2025-01-08 17: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")
|
local file = io.open(file_name, "r")
|
||||||
if file then
|
if file then
|
||||||
local table = core.deserialize(file:read("*all"))
|
local table = core.deserialize(file:read("*all"))
|
||||||
|
file:close()
|
||||||
if type(table) == "table" then
|
if type(table) == "table" then
|
||||||
if table.size then
|
if table.size then
|
||||||
self._size = table.size
|
self._size = table.size
|
||||||
|
Loading…
Reference in New Issue
Block a user