• 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: NSTask failing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask failing


  • Subject: Re: NSTask failing
  • From: Randall Meadows <email@hidden>
  • Date: Fri, 4 Apr 2008 15:06:46 -0600

On Apr 4, 2008, at 2:56 PM, Nir Soffer wrote:

On Apr 4, 2008, at 23:20, Randall Meadows wrote:
NSArray	*args = [NSArray arrayWithObjects:
   @"-cf",
   [NSString stringWithFormat:@"\"%@\"", tarFilePath],
   [NSString stringWithFormat:@"\"%@\"", plistPath],
   nil];


Try:
NSArray *args = [NSArray arrayWithObjects:@"-cf", tarFilePath, plistPath, nil];


You don't need to quote anything you feed to NSTask. Your code is equivalent to this wrong shell script:

tar -cf "\"tarFilePath\"" "\"plistPath\""

As I stated in my OP, I did try them unquoted, with the same result. _______________________________________________

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


References: 
 >NSTask failing (From: Randall Meadows <email@hidden>)
 >Re: NSTask failing (From: Nir Soffer <email@hidden>)

  • Prev by Date: Re: NSTask failing
  • Next by Date: Re: NSTask failing
  • Previous by thread: Re: NSTask failing
  • Next by thread: [MEET] April CocoaHeads Mac Developer Meetings
  • Index(es):
    • Date
    • Thread