aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-05 06:31:20 +0800
committerGitHub <noreply@github.com>2024-08-05 06:31:20 +0800
commit0c2860d9e5ec5417a94db6e3edd237578b76d418 (patch)
tree4041d6ac62dd901f477323a47dc07135764a191a /runtime/autoload
parent58406ab9f0adba6f26402d47479ca061864b2584 (diff)
parent28e2e8aa04308fbba1cdd9ec65305af95d9d1a0f (diff)
downloadrneovim-0c2860d9e5ec5417a94db6e3edd237578b76d418.tar.gz
rneovim-0c2860d9e5ec5417a94db6e3edd237578b76d418.tar.bz2
rneovim-0c2860d9e5ec5417a94db6e3edd237578b76d418.zip
Merge pull request #29979 from clason/vim-c5bdd66
vim-patch: update runtime files N/A patches for version.c: vim-patch:9.1.0658: Coverity warns about dereferencing NULL pointer.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/zip.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
index f77d729f03..e8973e3c80 100644
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -9,6 +9,7 @@
" 2024 Jul 23 by Vim Project: fix 'x' command
" 2024 Jul 24 by Vim Project: use delete() function
" 2024 Jul 20 by Vim Project: fix opening remote zipfile
+" 2024 Aug 04 by Vim Project: escape '[' in name of file to be extracted
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -218,8 +219,8 @@ fun! zip#Read(fname,mode)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
- let fname = substitute(fname, '[', '[[]', 'g')
endif
+ let fname = substitute(fname, '[', '[[]', 'g')
" sanity check
if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
redraw!
@@ -230,7 +231,7 @@ fun! zip#Read(fname,mode)
endif
" the following code does much the same thing as
- " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
+ " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
" but allows zipfile://... entries in quickfix lists
let temp = tempname()
let fn = expand('%:p')