mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
check for FIFO files when initializing path objects
calling filereadable() on a FIFO file never terminates so we have to check for them
This commit is contained in:
@@ -847,7 +847,7 @@ function! s:oTreeDirNode.InitChildren(silent) dict
|
|||||||
try
|
try
|
||||||
let path = s:oPath.New(i)
|
let path = s:oPath.New(i)
|
||||||
call self.CreateChild(path, 0)
|
call self.CreateChild(path, 0)
|
||||||
catch /^NERDTree.Path.InvalidArguments/
|
catch /^NERDTree.Path.\(InvalidArguments\|InvalidFiletype\)/
|
||||||
let invalidFilesFound = 1
|
let invalidFilesFound = 1
|
||||||
endtry
|
endtry
|
||||||
endif
|
endif
|
||||||
@@ -1402,8 +1402,13 @@ function! s:oPath.ReadInfoFromDisk(fullpath) dict
|
|||||||
|
|
||||||
let fullpath = s:oPath.WinToUnixPath(a:fullpath)
|
let fullpath = s:oPath.WinToUnixPath(a:fullpath)
|
||||||
|
|
||||||
|
if getftype(fullpath) == "fifo"
|
||||||
|
throw "NERDTree.Path.InvalidFiletype Exception: Cant handle FIFO files: " . a:fullpath
|
||||||
|
endif
|
||||||
|
|
||||||
let self.pathSegments = split(fullpath, '/')
|
let self.pathSegments = split(fullpath, '/')
|
||||||
|
|
||||||
|
|
||||||
let self.isReadOnly = 0
|
let self.isReadOnly = 0
|
||||||
if isdirectory(a:fullpath)
|
if isdirectory(a:fullpath)
|
||||||
let self.isDirectory = 1
|
let self.isDirectory = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user