mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
fix: escape directories containing brackets([...]) for globbing (#1359)
This commit is contained in:
@@ -278,6 +278,10 @@ function! s:TreeDirNode._glob(pattern, all)
|
|||||||
else
|
else
|
||||||
let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
|
let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
|
||||||
|
|
||||||
|
if nerdtree#runningWindows()
|
||||||
|
let l:pathSpec = substitute(l:pathSpec, "\\[\\(.*\\]\\)", "[[]\\1", "g")
|
||||||
|
endif
|
||||||
|
|
||||||
" On Windows, the drive letter may be removed by "fnamemodify()".
|
" On Windows, the drive letter may be removed by "fnamemodify()".
|
||||||
if nerdtree#runningWindows() && l:pathSpec[0] == nerdtree#slash()
|
if nerdtree#runningWindows() && l:pathSpec[0] == nerdtree#slash()
|
||||||
let l:pathSpec = self.path.drive . l:pathSpec
|
let l:pathSpec = self.path.drive . l:pathSpec
|
||||||
|
|||||||
Reference in New Issue
Block a user