• 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: Michael Vannorsdel <email@hidden>
  • Date: Fri, 4 Apr 2008 15:18:41 -0600

The error 2 means tar is not happy with one of both provided paths. Try printing out both paths and make sure they're proper. Paths passed to NSTask should not have escapes such as "/Some\ Folder/ file.tar", it should be "/Some Folder/files.tar".


On Apr 4, 2008, at 3:00 PM, Randall Meadows wrote:

On 04/04/2008, Randall Meadows <email@hidden> wrote:
NSArray *args = [NSArray arrayWithObjects:
 @"-cf",
 [NSString stringWithFormat:@"\"%@\"", tarFilePath],
 [NSString stringWithFormat:@"\"%@\"", plistPath],
 nil];
tarTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/tar"
arguments:args];
[tarTask waitUntilExit];
int status = [tarTask terminationStatus];

I do something very similar. The only difference is I'm not
constructing a path via stringWithFormat. I'm using either NSString's
"fileSystemRepresentation" or NSURL's "path" method to get a well
formed path to pass in as a parameter...


So I wonder what your stringWithFormat results actually look like.

_______________________________________________

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: "Herb Petschauer" <email@hidden>)
 >Re: NSTask failing (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: How to use bindings with IKImageBrowserView?
  • Next by Date: re: core data - beyond the simple example
  • Previous by thread: Re: NSTask failing
  • Next by thread: Re: NSTask failing
  • Index(es):
    • Date
    • Thread