Remember when Microsoft was busted using secret APIs to make their in-house apps better than anyone else's apps, and everyone though that stunk and was anti-competitive?
I don't see why this sort of stuff should be considered some kind of private detail of Time Machine. Especially since it is in the kernel, and the API is a public one. The behavior of the API is undocumented, but it shouldn't be. The behavior of all public APIs should be fully documented and available to all.
BTW, I do realise that linking directories is pretty dangerous, but that's in large part because none of the utilities or libraries take the possibility into account. This is part of the reason I'm interested in how it behaves.
--- On Thu, 10/2/08, Kevin Elliott <email@hidden> wrote:
From: Kevin Elliott <email@hidden> Subject: Re: Hard links to directories To: email@hidden Cc: email@hidden Date: Thursday, October 2, 2008, 3:32 PM
On Oct 1, 2008, at 8:00 PM, Chris Idou wrote:
> > A couple more questions: > > 1) How do permissions work? I notice that the system seems to stop > you doing dangerous things like hardlinking /System to somewhere, > even as root, but its not clear why this case is different.
Can't shed any light on that. As someone else has mentioned, directory hard links should effectively be considered SPI. If you want help understanding them so you can work better with TimeMachine, that's great. If you think you can use them to solve some other unrelated problem, then your making a mistake and should reconsider what your trying to
do.
> 2) I notice that once a directory has been hardlinked, it is forever > tainted in some fashion. If I hardlink a directory somewhere, then > unlink the 2nd link, then the original directory can never be > trashed in the Finder for example. Such an attempt will fail, even > though it is apparently no different to any other directory. Can > anyone enlighten me about this?
Yes, that's true. The first time a directory is hard linked, both directories become hard links. Once something is hard linked, there is no concept of the "original" directory, just 1 or more hard links. Not sure why the finders failing- I'd have to give it a try and look into it further. At the very least, you should probably file a bug.
-Kevin Elliott email@hidden http://web.mac.com/kelliott/
|