nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 6d0183ea782e8a35587448368f2dd82c6b3323e5
parent 6d83575490e006f1c926c3bef2c9f07910a5ffb5
Author: Chris Perl <chris.perl@gmail.com>
Date:   Wed, 11 Jan 2012 09:31:03 -0500

Revert "Fixed resolve() double endslash defect"

This reverts commit bc745b6e99888c97c7e8f6ff3b7e8f605cab5af1.  This
broke symlink detection on systems where vim's resolve() removes the
trailing slash from a path.

Diffstat:
Mplugin/NERD_tree.vim | 10+++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -2555,7 +2555,7 @@ function! s:Path.readInfoFromDisk(fullpath)
     let lastPathComponent = self.getLastPathComponent(0)
 
     "get the path to the new node with the parent dir fully resolved
-    let hardPath = resolve(self.strTrunk()) . lastPathComponent
+    let hardPath = resolve(self.strTrunk()) . '/' . lastPathComponent
 
     "if  the last part of the path is a symlink then flag it as such
     let self.isSymLink = (resolve(hardPath) != hardPath)
@@ -2733,13 +2733,9 @@ function! s:Path._str()
 endfunction
 
 "FUNCTION: Path.strTrunk() {{{3
-"Gets the path without the last segment on the end, always with an endslash
+"Gets the path without the last segment on the end.
 function! s:Path.strTrunk()
-    let toReturn = self.drive . '/' . join(self.pathSegments[0:-2], '/')
-    if toReturn !~# '\/$'
-        let toReturn .= '/'
-    endif
-    return toReturn
+    return self.drive . '/' . join(self.pathSegments[0:-2], '/')
 endfunction
 
 " FUNCTION: Path.tabnr() {{{3