Skip navigation.
 
mlRe: My app breaks when moved while running
FROM : Jens Alfke
DATE : Fri Feb 08 18:11:13 2008

On 8 Feb '08, at 4:42 AM, Gregory Weston wrote:

> While the raw effort *is* probably significant, the solution seems 
> fairly straightforward. Instead of relying on cached paths (or 
> whatever static structure is underlying these problems), the bundle 
> mechanisms could be caching aliases.


That's a possibility. Aliases don't work on all types of filesystems, 
though — IIRC, NFS is one that doesn't support them. SMB might be 
another; I'm not sure.

There are significant numbers of Macs being used in enterprise / 
higher-ed environments where apps or user accounts live on such file 
servers. In the past, that's been given as a rationale for not adding 
low-level OS features/improvements, such as this, that depend on 
filesystem functionality that isn't universally available.

Another issue with caching aliases is that it's prone to race 
conditions. At some point you have to dereference the alias into a 
path, and then use the path. If the app moves in between those two 
moments, the attempt to use the path will fail.

In an ideal world users should be able to move apps willy-nilly, but I 
have to say I've never heard of a case where this actually caused a 
problem in the real world. Moving documents is a lot more common, so 
NSDocument does have support for tracking file movement.

—Jens_______________________________________________

Cocoa-dev mailing list (<email_removed>)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>

This email sent to <email_removed>

Related mailsAuthorDate
mlMy app breaks when moved while running Sanford Selznick Feb 7, 20:50
mlRe: My app breaks when moved while running Phil Feb 7, 21:31
mlRe: My app breaks when moved while running William Bates Feb 8, 04:28
mlRe: My app breaks when moved while running Mac Man Feb 8, 05:38
mlRe: My app breaks when moved while running Gregory Weston Feb 8, 13:42
mlRe: My app breaks when moved while running Sean McBride Feb 8, 16:37
mlRe: My app breaks when moved while running Jens Alfke Feb 8, 18:11
mlRe: My app breaks when moved while running Kyle Sluder Feb 8, 18:16
mlRe: My app breaks when moved while running Phil Feb 8, 21:06
mlRe: My app breaks when moved while running William Bates Feb 8, 22:52
mlRe: My app breaks when moved while running Stephen Hoffman Feb 9, 00:19
mlRe: My app breaks when moved while running Stephen Hoffman Feb 9, 00:32