Escape commas in the globpath() function's path argument.

If not escaped, commas will cause globpath() to search in multiple
directories, none of which really exist.
This commit is contained in:
Phil Runninger (home) 2018-08-13 23:01:02 -04:00 committed by Jason Franklin
parent b8cc044760
commit 808f5b225b

View File

@ -247,7 +247,7 @@ function! s:TreeDirNode._glob(pattern, all)
if self.path.str() == getcwd()
let l:pathSpec = ','
else
let l:pathSpec = fnamemodify(self.path.str({'format': 'Glob'}), ':.')
let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
" On Windows, the drive letter may be removed by "fnamemodify()".
if nerdtree#runningWindows() && l:pathSpec[0] == g:NERDTreePath.Slash()