This is the mail archive of the
mailing list for the Cygwin project.
Re: bug: hard links to soft links do not work
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin at cygwin dot com
- Date: Thu, 1 Aug 2002 17:19:47 -0400 (EDT)
- Subject: Re: bug: hard links to soft links do not work
- Reply-to: cygwin at cygwin dot com
On 1 Aug 2002, 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 <email@example.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))
> i.e., when the target is a symlink, you symlink to its target.
> 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.
The nature of a hardlink is actually slightly more than that. I think the
inodes of the hardlink and the real file have to be the same. This won't
happen if you just create a new symbolic link.
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html