Bram Moolenaar wrote:

> The mch_FullName() in os_unix.c already takes care of symlinks.  Why
> would this extra code for Cygwin be needed?
>
> If something needs to be patched it's probably best done in mch_FullName().


In cygwin /etc/hosts is a symbolic link to C:\WINDOWS\system32\drivers\etc\hosts
and if expanded in that way is not recognized as a full path because
does not start with / or with ~.

The small patch change it in posix format
 /cygdrive/c/WINDOWS/system32/drivers/etc/hosts
so it is recognized as a full path and the .swp file
is created (in the other case there is the
message "*E303* Unable to open swap file")

Maybe the mch_FullName() is a better place to put the
cygwin_conv_to_posix_path().
I have put it there because there is also
slash_adjust() for other platform.

Luca.

Reply via email to