mirror of https://github.com/folke/lazy.nvim.git
fix(cache): handle corrupted cache files
This commit is contained in:
parent
a80422f217
commit
db5b67e75c
|
@ -141,6 +141,9 @@ function Loader.read(name)
|
|||
uv.fs_close(f)
|
||||
|
||||
local zero = data:find("\0", 1, true)
|
||||
if not zero then
|
||||
return
|
||||
end
|
||||
|
||||
---@type integer[]|{[0]:integer}
|
||||
local header = vim.split(data:sub(1, zero - 1), ",")
|
||||
|
|
Loading…
Reference in New Issue