Re: Moving oneself to /Applications (or ~/Applications)
Re: Moving oneself to /Applications (or ~/Applications)
- Subject: Re: Moving oneself to /Applications (or ~/Applications)
- From: Kyle Sluder <email@hidden>
- Date: Mon, 23 Feb 2009 22:53:25 -0500
On Mon, Feb 23, 2009 at 10:08 PM, Tommy Nordgren
<email@hidden> wrote:
> It will be /Volumes/Mother 1/... I've tested.
> This can be handled by using a regexp class for the matching instead of a
> simple
> equality test.
> Also, while it's possible to mount a disk image at other places than
> under Volumes,
> that won't happen when doubleclicking a disk image or it being mounted from
> Safari
This sounds like an amazing trip through Software Engineering Hell!
1) Relying on an implementation detail of a third-party application
(Safari mounts images in /Volumes).
2) Hard-coding a path in the filesystem (/Volumes)
3) Not considering other actions that can lead to the same
circumstance (a user can create a directory in /Volumes)
4) Bringing in a third-party regular expression library to deal with
paths (since one that works with NSString is not provided with the
system)
5) Not just using the system-provided facilities to ask the direct
question ("Is the volume on which this app's bundle resides
removable?") but relying on aforementioned assumptions to ask an
indirect question ("Does the path of the bundle of this app match a
pattern that resembles that of the system-created directories in the
default location for mount points?")
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden