delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/19/07:57:02

X-Spam-Check-By: sourceware.org
Message-ID: <44969100.6060309@tlinx.org>
Date: Mon, 19 Jun 2006 04:56:48 -0700
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: vim 7 gives error when editing /etc/hosts
References: <C874DBE9D30B584587F8CD0EC34DA8BE01C6DAEC AT EX00 DOT idirect DOT net>
In-Reply-To: <C874DBE9D30B584587F8CD0EC34DA8BE01C6DAEC@EX00.idirect.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com


Harig, Mark wrote:
>> -----Original Message-----
>> From: cygwin-owner AT cygwin DOT com 
>> [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Frank Fesevur
>> Sent: Tuesday, June 13, 2006 5:35 AM
>> To: cygwin AT cygwin DOT com
>> Subject: vim 7 gives error when editing /etc/hosts
>>
>> Hi,
>>
>> When I try to edit /etc/hosts with vim7, it gives this error:
>>    E303: Unable to open swap file for "hosts", recovery impossible
>>
>> The file can be edited, but this never happened with 6.4
>>     
> vim appears to be unable to follow some links.
>
> The following steps lead to the above error for me, also.
>
> $ touch "c:\foo.txt"
> $ ln -s "c:\foo.txt" bar.txt
> $ vim bar.txt  # vim reports the swap-file error
>
> On my computer, and I suspect on yours, /etc/hosts is a
> symbolic link to Windows 'hosts' file:
>   
> $  ls -ln /etc/hosts
> lrwxrwxrwx 1 13558 545 37 Apr  4 18:11 /etc/hosts ->
> C:\WINDOWS\system32\drivers\etc\hosts
>
> Curiously, the link does not cause an error if it was created using
> "cygwin" syntax:
>
> $ ln -fs /c/foo.txt bar.txt  # assumes that you've set the cygdrive
> prefix to "/"
> $ vim bar.txt   # No swap-file error is reported.
>   
----
    That doesn't seem to explain why vim 6.4 worked.  Vim should
be functioning as a POSIX app, and the difference in the pathname
shouldn't make any difference as it should be filtered and converted
by the cygwin layer before vim sees it.

    It seems like something else may be in play.

-l

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019