• 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: Translating filenames for command line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Translating filenames for command line?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Translating filenames for command line? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Translating filenames for command line?
  • Next by Date: Re: Translating filenames for command line?
  • Previous by thread: Re: Translating filenames for command line?
  • Next by thread: Re: Translating filenames for command line?
  • Index(es):
    • Date
    • Thread