Skip to content

Commit 8e476a7

Browse files
committed
Avoid expansion of directory path in s:list_dir
Escape special characters `;*?` to prevent upward search and globing.
1 parent 45f09d9 commit 8e476a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/dirvish.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif
5353

5454
function! s:list_dir(dir) abort
5555
" Escape for globpath().
56-
let dir_esc = escape(substitute(a:dir,'\[','[[]','g'), ',{}^$\')
56+
let dir_esc = escape(substitute(a:dir,'\[','[[]','g'), ',;*?{}^$\')
5757
let paths = s:globlist(dir_esc, '*')
5858
"Append dot-prefixed files. globpath() cannot do both in 1 pass.
5959
let paths = paths + s:globlist(dir_esc, '.[^.]*')

0 commit comments

Comments
 (0)