Re: Bug Report: fnamemodify() fails on Windows

2018-06-13 Fir de Conversatie Bram Moolenaar


Jason Franklin wrote:

> I wanted to fix this myself, but I'm not having any fun fighting with the
> Microsoft build tools.  Hopefully, someone else has time to look into this
> issue.
> 
> System:   Windows 10
> Vim Version:  8.1.0001
> 
> To reproduce:
> 
> :echo fnamemodify('C:\__nodir__\__nofile__', ':.')
> 
> You'll see that the "C:" is removed from the given path.  If
> "C:\__nodir__\__nofile__" doesn't exist, the path should not be modified 
> (because
> it's not relative to the working directory).
> 
> See ":help filename-modifiers" for the description of how ":." should cause
> fnamemodify() to behave.

On MS-Windows the drive is sticky, thus \dir\path will use the current
drive.  Thus the resulting path will work.  We can adjust the help to
explain this.

-- 
Despite the cost of living, have you noticed how it remains so popular?

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Bug Report: fnamemodify() fails on Windows

2018-06-13 Fir de Conversatie Jason Franklin
I wanted to fix this myself, but I'm not having any fun fighting with the
Microsoft build tools.  Hopefully, someone else has time to look into this
issue.

System:   Windows 10
Vim Version:  8.1.0001

To reproduce:

:echo fnamemodify('C:\__nodir__\__nofile__', ':.')

You'll see that the "C:" is removed from the given path.  If
"C:\__nodir__\__nofile__" doesn't exist, the path should not be modified 
(because
it's not relative to the working directory).

See ":help filename-modifiers" for the description of how ":." should cause
fnamemodify() to behave.

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.