auto close the handle after loaded the buffer
This commit is contained in:
parent
69a085f8cf
commit
c15be8c7b5
|
|
@ -265,6 +265,7 @@ function _M.load_content(dbPath)
|
||||||
|
|
||||||
local c = handle:read("*a")
|
local c = handle:read("*a")
|
||||||
if c == nil then
|
if c == nil then
|
||||||
|
handle:close()
|
||||||
return nil, string.format("failed to read xdb content")
|
return nil, string.format("failed to read xdb content")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue