On 18-Apr-2013 15:15 +0200, Christian Brabandt wrote:
> On Thu, April 18, 2013 15:32, Ingo Karkat wrote:
>> On 18-Apr-2013 15:15 +0200, Christian Brabandt wrote:
>>
>>> On Thu, April 18, 2013 15:06, Ingo Karkat wrote:
>>>> Please note that for the root directory, C:\ is different than C:
>>>> (which
>>>> means the current working directory of the C drive), so leaving off the
>>>> trailing path separator may cause problems in this case. (I haven't
>>>> checked your patch, but :echo globpath('C:', '*') returns different
>>>> results than :echo globpath('C:\', '*') after :cd C:\windows.
>>>>
>>>
>>> That is interesting, because the echo globpath('C:', '*') result is
>>> rather useless here:
>>>
>>> ,----
>>> | C:111.txt
>>> | C:stats-sql.txt
>>> | C:test.txt
>>> `----
>>>
>>> Note the missing slash. And C: here stands for c:\temp, so the output
>>> is rather useless in this case.
>>>
>>> This looks like another bug here.
>>
>> No, this is just the unusual but valid notation. Without the backslash
>> after the drive letter, this means "this path from the current working
>> directory of the preceding drive letter". Therefore, this works:
>>
>> :cd C:\Windows
>> :edit C:win.ini
>> " Existing file opens.
>> :echo expand('%:p')
>> C:\Windows\win.ini
>>
>
> I'd still prefer to have the glob return an absolute path an not such
> a silly name. You can't even copy and paste that string.
> Would it hurt to have globpath() in that case return an
> absolute path?
It's not silly, you're just not used to it! (I started with CP/M and
MS-DOS 5; maybe I have a different perspective.) It's a
fixed-drive-relative-path; you wouldn't expect ../../foo to be
copy&paste-able, neither, would you?
globpath() does not return absolute paths for other more benign relative
paths such as '.', so I'm against adding a special case. Sorry. Anyway,
I'm more interested whether the proposed patch has a problem...
-- regards, ingo
--
--
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].
For more options, visit https://groups.google.com/groups/opt_out.