aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/nvim/zip.lua
diff options
context:
space:
mode:
authorBarrett Ruth <br@barrettruth.com>2026-07-24 16:28:25 -0700
committerBarrett Ruth <br@barrettruth.com>2026-07-29 14:32:36 -0500
commitf82cf8fd596fa173a028bd04035d0465d09f8d48 (patch)
tree285441cf49d6c5ad1886934b8be618021c47349e /runtime/lua/nvim/zip.lua
parente63cf571067e8d1777adc354b098dfc91c2ab5de (diff)
downloadrneovim-f82cf8fd596fa173a028bd04035d0465d09f8d48.tar.gz
rneovim-f82cf8fd596fa173a028bd04035d0465d09f8d48.tar.bz2
rneovim-f82cf8fd596fa173a028bd04035d0465d09f8d48.zip
fix(zip): list a valid empty archive as empty
Diffstat (limited to 'runtime/lua/nvim/zip.lua')
-rw-r--r--runtime/lua/nvim/zip.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/lua/nvim/zip.lua b/runtime/lua/nvim/zip.lua
index af07794039..7264d33558 100644
--- a/runtime/lua/nvim/zip.lua
+++ b/runtime/lua/nvim/zip.lua
@@ -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 })