From e819e13a5ddd249c3313dfe549d99f1dc279c48c Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Sun, 20 Jul 2008 00:50:47 +1200 Subject: [PATCH] check for FIFO files when initializing path objects calling filereadable() on a FIFO file never terminates so we have to check for them --- plugin/NERD_tree.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index c9ce553..f1fd188 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -847,7 +847,7 @@ function! s:oTreeDirNode.InitChildren(silent) dict try let path = s:oPath.New(i) call self.CreateChild(path, 0) - catch /^NERDTree.Path.InvalidArguments/ + catch /^NERDTree.Path.\(InvalidArguments\|InvalidFiletype\)/ let invalidFilesFound = 1 endtry endif @@ -1402,8 +1402,13 @@ function! s:oPath.ReadInfoFromDisk(fullpath) dict 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.isReadOnly = 0 if isdirectory(a:fullpath) let self.isDirectory = 1