Skip to content

Commit db5b67e

Browse files
committedMar 24, 2023
fix(cache): handle corrupted cache files
1 parent a80422f commit db5b67e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎lua/lazy/core/cache.lua

+3
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ function Loader.read(name)
141141
uv.fs_close(f)
142142

143143
local zero = data:find("\0", 1, true)
144+
if not zero then
145+
return
146+
end
144147

145148
---@type integer[]|{[0]:integer}
146149
local header = vim.split(data:sub(1, zero - 1), ",")

0 commit comments

Comments
 (0)
Please sign in to comment.