On 2006-10-13, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
> On Oct 13 21:53, Yakov Lerner wrote:
> > On 10/13/06, Corinna Vinschen <[EMAIL PROTECTED]> wrote:
> > >Hi,
> > >
> > >I got a report on the Cygwin mailing list that the following message
> > >appears when trying to open /etc/hosts in vim:
> > >
> > >  E303: Unable to open swap file for "/etc/hosts", recovery impossible
> > >
> > >What happens is this:
> > >
> > >/etc/hosts is by default a symbolic link which points to the hosts file
> > >in the Windows system directory.  The symbolic link is created as a link
> > >to the DOS path, for instance:
> > >
> > >  $ ls -l /etc/hosts
> > >  lrwxrwxrwx 1 corinna None 37 Oct 13 18:32 /etc/hosts -> 
> > >  c:\WINDOWS\system32\drivers\etc\hosts
> > 
> > I bet you can solve the problem by relinking /etc/hosts to
> > /cygdrive/c/windows/system32/drivers/etc/hosts.
> > 
> > This is how it *should* be linked.
> 
> Sure, but that's not the problem.  If it's not /etc/hosts it's another
> symlink created by a user.  DOS paths do work, usually.

Hi Corinna,

I thought the purpose of Cygwin was to provide a Linux-like 
environment for applications, so that, for example, one could simply 
recompile under Cygwin an application written for Linux and not have 
to rewrite the file-handling routines to recognize DOS file names.
That's the purpose of the cygdrive directory, is it not?

It seems to me that if "DOS paths do work, usually," it's because 
the application was written to deal with them or it never looks at 
any file names, but simply hands them whole to the Cygwin file I/O 
API.

As Yakov said, it seems to me that the proper solution is for Cygwin 
to link /etc/hosts to /cygdrive/c/windows/system32/drivers/etc/hosts.
If users have problems because they've mounted cygdrive someplace
else, or have created symbolic links to DOS file names, then to
quote someone on the cygwin list, WDDTT (Well Don't Do That Then).

Regards,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to