Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit bc745b6 introduced code which changed how "hardPath" is calculated. Essentially it moved the addition of a "/" between the last path component and the rest of the path from s:Path.readInfoFromDisk() down into s:Path.strTrunk(). However, on my system this breaks the calculation of hardPath, as resolve() removes the trailing "/" returned by s:Path.strTrunk():
On my system, these two commands return different results:
:echo g:NERDTreeFileNode.GetSelected().path.strTrunk()
-> "/Users/cperl/tmp/2012-01-09/t/" (with trailing "/")
:echo resolve(g:NERDTreeFileNode.GetSelected().path.strTrunk())
-> "/Users/cperl/tmp/2012-01-09/t" (without trailing "/")
This means that for an example directory structure like this:
[cperl@screed ~/tmp/2012-01-09]$ tree -f -i t/
t
t/a
t/b -> a
2 directories, 0 files
hardPath for t/a becomes "/Users/cperl/tmp/2012-01-09/ta" and for t/b becomes "/Users/cperl/tmp/2012-01-09/tb". Since these are bogus paths, resolve(hardPath) will always be equal to hardPath and hence nothing will be flagged as a symlink.
Just as an example having nothing to do with NERDTree showing resolve removing the trailing slash:
:echo resolve("/foo/bar/baz/")
-> "/foo/bar/baz"