• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hard linked files cannot be modified
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Hard linked files cannot be modified (From: Alberto Ricart <email@hidden>)

  • Prev by Date: Re: Dictionary to an invisible file
  • Next by Date: Re: Making a custom tabbed view control. Need suggestions.
  • Previous by thread: Re: Hard linked files cannot be modified
  • Next by thread: Re: Hard linked files cannot be modified
  • Index(es):
    • Date
    • Thread