Re: Translating filenames for command line?
Re: Translating filenames for command line?
- Subject: Re: Translating filenames for command line?
- From: Rosyna <email@hidden>
- Date: Tue, 1 Jan 2002 06:44:51 -0700
that's debateable ;) some people suggest (correctly) that it never
would have happened if the installer looked for an application with
creator code hook, checked to see if it was not a classic app, and
removed that. (a few lines of code when using LaunchServices.
* Discussion:
* Returns the application with the corresponding input information.
* The registry of applications is consulted first in order of
* bundleID, then creator, then name. All comparisons are case
* insensitive and 'ties' are decided first by version, then by
* native vs. Classic.
FSRef ref;
OSStatus err=LSFindApplicationForInfo('hook',NULL,NULL,&ref,NULL);
if (!err)
{
LSItemInfoRecord infoRec;
LSCopyItemInfoForRef(&ref,kLSRequestAppTypeFlags,&infoRec);
if (infoRec.flags & kLSItemInfoIsNativeApp)
err=FSDeleteObject(&ref);
if (err)
//report error, don't delete contents of hard drives.
}
It just makes me wonder what happens right now if my hard drive name
is in quotes? Will it do rm -rf "/Volumes/"MyHD/Stuff" ( rm -rf
"/Volumes/" and rm -rf MyHD/Stuff")
Ack, at 1/1/02, Scott Anguish said:
It would have been the same problem if they'd called it via
NSTask (and that's more likely how that script was called...)
System() wasn't the culprit there... lack of testing was
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insane People