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