On Fri, Oct 13, 2006 at 10:34:40PM +0200, Corinna Vinschen wrote:
> 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.

I misspoke slightly in my previous email.  The patch isn't purely about
where to store the file.  It primarily deals with determining what
actual file is being edited so that proper swapfile checking can be
performed.  In order to do this it has to resolve the symlink and
determines the absolute path for the file being edited.  It may be that
determining the absolute path is causing the mixup in path formats,
although that seems unlikely since it is a common function used
throughout Vim.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to