auto close the handle after loaded the buffer

This commit is contained in:
Lion 2022-07-20 16:06:37 +08:00
parent 69a085f8cf
commit c15be8c7b5

View File

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