Re: Hard linked files cannot be modified
Re: Hard linked files cannot be modified
- Subject: Re: Hard linked files cannot be modified
- From: Alastair Houghton <email@hidden>
- Date: Wed, 16 Nov 2005 15:45:50 +0000
On 16 Nov 2005, at 15:30, Alberto Ricart wrote:
Check your permissions. When you hard link a file you are simply
referencing the same inode from a different file name. Creating a
link doesn't change permissions etc. Also a hard link cannot span
volumes.
This isn't a permissions issue. It's caused by a bug in OS X,
specifically the exchangedata() function does not work satisfactorily
on files that have *ever* been hard linked to, and since---on volumes
that support it---the Cocoa framework tries to use exchangedata() to
implement a safe save that doesn't break aliases, any application
using it will fail to save correctly over a such a file.
It's important to note that this behaviour will continue even if you
delete all other links to the file; once a file has been hard linked,
it is represented differently in the filesystem and there's no way to
get back to the old representation (other than making a copy and
deleting the original, which breaks aliases).
It would make sense for exchangedata() to work for hard linked files,
or at the very least for the Cocoa framework to spot the error and
try a different technique (such as the more usual copy & rename)
instead.
There was a previous thread on this subject:
http://www.cocoabuilder.com/archive/message/cocoa/2005/10/4/147484
Kind regards,
Alastair.
--
http://www.alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden