Re: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
Re: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
- Subject: Re: creating temp files or temp folders in standard temp file locations in mdimporter on Mac OS X 10.8.3
- From: Quincey Morris <email@hidden>
- Date: Mon, 03 Jun 2013 01:17:38 -0700
On Jun 1, 2013, at 14:04 , Kyle Sluder <email@hidden> wrote:
> Spotlight importers run within a worker process; thus, they inherit the
> sandbox of the worker process, not the sandbox of your app (which might
> not even be running).
The part of this line of thinking that I don't understand is why the worker process, whatever it is, shouldn't have access to a temporary directory of its own.
The sample code tries to create a subdirectory inside the directory pointed to by NSTemporaryDirectory(). If this code is running in the context of an app sandbox, then there should be no problem creating a subdirectory in its temp dir. If the code is running in (say) a background worker process, then it should have its own temp dir, and there should still be no problem.
All of which makes me wonder if NSTemporaryDirectory() just isn't available in the worker process, for some non-apparent reason. In that case, isn't there a Unix-ey temp dir to use instead (/var/something or /usr/something)?
Or have I missed an essential step in your reasoning?
_______________________________________________
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