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 04:21:43PM -0400, Sam Steingold wrote:
>> * In message <20020801200325.GC27689@redhat.com>
>> * On the subject of "Re: bug: hard links to soft links do not work"
>> * Sent on Thu, 1 Aug 2002 16:03:25 -0400
>> * Honorable Christopher Faylor <cgf@redhat.com> writes:
>>
>> I don't think this is a 'ln' problem.  It's a cygwin problem.  If
>> cygwin is doing the wrong thing then it should, as Sam said, either be
>> made to work or fail, not provide binary gobbledegook.
>> 
>> If this was to be made to work correctly, it would be pretty low level
>> in cygwin in the path_conv and symlink_check methods.
>> 
>> It would be much easier to fail in this scenario rather than make it
>> work correctly, I think.
>
>actually, this is very easy:
>
>(defmethod hard-link :around (from to)
>  (if (symbolic-link-p to)
>      (symbolic-link from (resolve-symbolic-link to))
>      (call-next-method)))
>
>i.e., when the target is a symlink, you symlink to its target.

Is that *lisp* code?  This makes it easy because...?  I don't quite
follow.  Obviously anyone can conceive of some logic to make this fail
but without looking at the actual code in question it isn't going
to be too useful.

Just to make it clear again, this is a cygwin dll problem.  Modifying
ln fixes ln.  It doesn't fix perl or python or any C program that uses
link().

Anyway, I will take a look at this.  No need for a patch.  I'll fix it,
where "fix" means make it work sensibly.

cgf
>think of a symlink as if it had no inode (like it is on a real FS),
>i.e., just a special dirent pointing to the target.
>Then the hardlink of a symlink is another symlink pointing to the same
>place, since the nature of hardlink is to create a file which is
>indistinguishable from the target.
>
>-- 
>Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
><http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
><http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
>Of course, I haven't tried it. But it will work.    - Isaak Asimov
>
>
>
>--
>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/

--
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]