I'm having problems with what should be a simple NSTask invocation:
NSArray *args = [NSArray arrayWithObjects:
@"-cf",
[NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", tarFilePath],
[NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", plistPath],
nil];
tarTask = [NSTask launchedTaskWithLaunchPath:@"/usr/bin/tar"
arguments:args];
[tarTask waitUntilExit];
int status = [tarTask terminationStatus];
After all that, status = 2.
I've tried making the arguments only 1 entry in the array, and the
same thing; I've both quoting and not quoting the arguments, and the
same thing; I've tried using a dash with the options and without, and
the same thing--always status=2 (fatal error).
tarFilePath and plistPath are full paths, and valid ones at that.
I can take the contents of all that and do it on the command line and
that works. What in the world am I missing here that is causing it to
fail?
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]