delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/01/20:03:34

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Thu, 1 Aug 2002 20:03:46 -0400
From: Christopher Faylor <cgf-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: bug: hard links to soft links do not work
Message-ID: <20020802000346.GA373@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <sa0eldimogw DOT fsf AT glip DOT premonitia DOT com> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020801123520 DOT 01f97010 AT pop3 DOT cris DOT com> <20020801200325 DOT GC27689 AT redhat DOT com> <sa0it2ul488 DOT fsf AT glip DOT premonitia DOT com> <20020801210148 DOT GB29167 AT redhat DOT com>
Mime-Version: 1.0
In-Reply-To: <20020801210148.GB29167@redhat.com>
User-Agent: Mutt/1.3.23.1i

On Thu, Aug 01, 2002 at 05:01:48PM -0400, Christopher Faylor wrote:
>Anyway, I will take a look at this.  No need for a patch.  I'll fix it,
>where "fix" means make it work sensibly.

I've checked in a patch.  What I've done isn't consistent with linux but
at least it does something sensible now:

  j:\tmp>touch x
  j:\tmp>ln -s x y
  j:\tmp>ln y z
  j:\tmp>ls -l ?
  -rw-rw-rw-    2 cgf      None            0 Aug  1 19:56 x
  lrwxrwxrwx    1 cgf      None           82 Aug  1 19:56 y -> x
  -rw-rw-rw-    2 cgf      None            0 Aug  1 19:56 z

Making it consistent with linux is difficult owing to the fact that
there are at least two different types of symlinks in cygwin.  Corinna
pointed out to me in private email that we'd have to correctly detect
which type of symlink we were attempting to link to and do the correct
thing for each.  For "new" symlinks, we'd have to add a .lnk extension.
For "old" symlinks we wouldn't do that.

This would mean propagating the info about the symlink type almost to
the API level in cygwin.  That is messy.  Contrast that to the above two
character source code change.  No contest.

cgf
--
Please do not send me personal email with cygwin questions.
Use the resources at http://cygwin.com/ .

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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