fix(zip): list a valid empty archive as empty

This commit is contained in:
Barrett Ruth
2026-07-24 16:28:25 -07:00
parent e63cf57106
commit f82cf8fd59
2 changed files with 17 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ local function list_archive(source)
end
local result = system:wait()
if result.code ~= 0 then
if vim.trim(result.stdout or '') == 'Empty zipfile.' then
return {}
end
return nil, vim.trim(result.stderr or ''), true
end
return vim.split(result.stdout or '', '\n', { plain = true, trimempty = true })