On Oct 13 16:06, James Vega wrote:
> On Fri, Oct 13, 2006 at 09:38:16PM +0200, Corinna Vinschen wrote:
> > Interesting enough it works in 6.4 without doing anything similar to my
> > patch does to os_unix.c.  What's different in swap file handling between
> > 6.4 and 7.0 so that it works in the former but doesn;t in the latter?
> 
> memline.c was changed for 7.0 as far as how Vim determined where to
> store the swapfile when editing symlinks.  The change was to follow the
> symlink, find the directory the actual file was in and key off that when
> creating the swapfile so that editing the symlink and the actual file at
> the same time would cause the 'swapfile already exists' message.  Maybe
> this is related.  The relevant code is sectioned off by '#ifdef
> HAVE_READLINK'/'#endif' sections in memline.c

Thanks for this hint.  I'll look into that in the next couple of days.
It doesn't seem to be related to the actual directory in which to place
the swap file, though.  "directory" is set to /tmp in my example, so the
swap file should be created there.  And as the example shows, vim tries
to do that.  It just fails to extract the basename correctly from the
DOS path because it doesn't treat backslashes as path separators.

Btw., apparently vim doesn't use basename(3), even if the underlying
system provides it.  The Cygwin version of this function would return
the correct basename no matter what path separators have been used.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

Reply via email to