Hi Ken

On 05/06/2019 11:56, Ken Takata wrote:
> 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

Many thanks for this.  Bonus points for extending getftype() to work 
under Windows for consistency with what resolve() returns ;-)

TTFN

Mike
-- 
If nodding means yes, why doesn't yesding mean no?

-- 
-- 
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/6330f627-17c8-c9e6-3794-5ab8994cadde%40globalgraphics.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui