Hi,

2019/6/5 Wed 5:25:13 UTC+9 Mike Williams wrote:
> On 04/06/2019 19:18, Bram Moolenaar wrote:
> > 
> > Mike Williams wrote:
> > 
> >> It looks like the change to Windows for resolve() in 8.1.1417 was a
> >> breaking change.  I use the NERDtree plugin and any build after than
> >> change results in NERDtree reports plain files on Windows as links.  See
> >> attached image.
> >>
> >> I guess the question is. is this wrong in VIM or a bad assumption in
> >> NERDtree in what resolve() returns?  Since it is a breaking change in
> >> VIM I thought I would start the ball rolling here.
> > 
> > Perhaps NERDtree checks if the returned path is a full path?
> > Assuming you still have the older Vim version, compare the output of
> > resolve() for some simple files, is it different?
> 
> It is different.  8.1.1416 does not return a full path for simple files 
> while 8.1.1417 onwards does.
> 
> > The docs say:
> >             On MS-Windows, when {filename} is a shortcut (a .lnk file),
> >             returns the path the shortcut points to in a simplified form.
> >             When {filename} is a symbolic link or junction point, return
> >             the full path to the target. If the target of junction is
> >             removed, return {filename}.
> > 
> > It says some more about a simplified result.  But that wasn't changed.
> 
> Based on the above it means that there is no way to tell the difference 
> between a simple file and a symbolic link or junction point, getftype() 
> does not help on Windows.  But perhaps that does not matter.
> 
> Spelunking in NERDtree the root cause of the problem is directory 
> separators.  It seems a bit free in always using '/' when building 
> paths.  Now that resolve() returns a full path filepath checks based on 
> string comparison fails.  A local hack^wfix confirms this but NERDtree 
> is still able to detect symbolic links so there must some other method 
> to distinguish that I am not aware of.
> 
> I'll bounce over to GitHub to report this.
> 
> TTFN
> 
> Mike

I created a PR for this: https://github.com/vim/vim/pull/4492

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/c9a6fd8d-7dd5-491d-9cf9-a025b5b9ea11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui