This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug: hard links to soft links do not work


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]