On Thu, Dec 06, 2001 at 12:43:17PM -0600, Kim, Anthony wrote: > On Thu, Dec 06, 2001, Corinna Vinschen wrote: > > > On Thu, Dec 06, 2001 at 11:36:01AM -0600, Kim, Anthony wrote: > > > But I mean to say, wouldn't it be nice and consistent if > > > ln -s <dir> <link> worked like linkd as opposed to creating a > > > shortcut. I am aware of "mount" under cygwin but the mount is not > > > exported to Windows. > > > > I have checked if it makes sense using reparse points for symlinks > > once when W2K was new. We had to reject using them since they are > > not as flexible as we need it to get POSIX symlinks. Main reason is > > that they have to be absolute windows paths. So they would have to > > be changed each time the mount table is changed in a way which would > > influence them. Many POSIX symlinks are relative links to their > > target. That's completely impossible. And reparse points to files > > aren't supported at all. > > A couple of comments: I agree the MS implementation is not > flexible. However, if the reparse points do not cross file > systems, I believe they can be relative. I do this now and > again.. > > C:\some\dir\here\and\there\> linkd otherdir ..\..\otherdir
Linkd takes a relative path as argument but it's translated into an absolute path before storing it in the reparse point. > The crappy part about the MS implementation is there doesn't seem > to exist an easy way to obtain the link destination. There's no > 'ls -l' equivalent. It's no problem to read the reparse point content so a Cygwin implementation would have given that information. No, reparse points are not useful for a POSIX emulation layer. Sure, it would be possible to add code to Cygwin which allows to treat reparse points as symlinks but I'm not going to do that in the near future and I'm not as interested in them as I was in early 2000. At least it would again slow down the symlink evaluation code (the third method to look for). However, if somebody wants to contribute code... > You're right about reparse points not working with files, but > hardlinks solve that issue. I was thinking in pseudo code: > > -s flag given: > if src == directory > create_junction() > else > create_shortcut() > endif But hardlinks are a completely different thing. And they are actually supported in Cygwin for years on NTFS. FAT can't have hardlinks. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:[EMAIL PROTECTED] Red Hat, Inc. -- 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/