Re: NSTask failing

2008-04-04 Thread Nir Soffer
On Apr 4, 2008, at 23:20, Randall Meadows wrote: NSArray *args = [NSArray arrayWithObjects: @"-cf", [NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", tarFilePath], [NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", plistPath], nil]; Try: NSArray *args = [NSArray arrayWithObj

Re: NSTask failing

2008-04-04 Thread Randall Meadows
On Apr 4, 2008, at 3:52 PM, Hamish Allan wrote: On Fri, Apr 4, 2008 at 10:43 PM, Randall Meadows <[EMAIL PROTECTED] pc.com> wrote: I assume there was supposed to be a [tarTask launch] in there somewhere, eh? :) If you like :) Now, I have no idea how I'm goint to detect an ACTUAL error

Re: NSTask failing

2008-04-04 Thread Hamish Allan
On Fri, Apr 4, 2008 at 10:43 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > I assume there was supposed to be a [tarTask launch] in there somewhere, > eh? :) If you like :) > Now, I have no idea how I'm goint to detect an ACTUAL error condition; You could just connect the resultsPipe to s

Re: NSTask failing

2008-04-04 Thread Randall Meadows
On Apr 4, 2008, at 3:40 PM, Peter Maurer wrote: 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

Re: NSTask failing

2008-04-04 Thread Randall Meadows
On Apr 4, 2008, at 3:14 PM, Hamish Allan wrote: NSArray *args = [NSArray arrayWithObjects: @"cfv", tarFilePath, plistPath, nil]; tarTask = [[[NSTask alloc] init] autorelease]; [tarTask setLaunchPath:@"/usr/bin/tar"]; [tarTask setArguments:args]; NSPipe *resultsPipe = [NSPipe pipe]; NSFileHandle

Re: NSTask failing

2008-04-04 Thread Peter Maurer
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). You should unquote those paths, becaus

Re: NSTask failing

2008-04-04 Thread Michael Vannorsdel
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 Meadow

Re: NSTask failing

2008-04-04 Thread Hamish Allan
On Fri, Apr 4, 2008 at 9:20 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > NSArray *args = [NSArray arrayWithObjects: >@"-cf", >[NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", tarFilePath], >[NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", plistPath], >nil]; > tarTask =

Re: NSTask failing

2008-04-04 Thread Herb Petschauer
On 04/04/2008, Randall Meadows <[EMAIL PROTECTED]> wrote: > > So I wonder what your stringWithFormat results actually look like. > > > > Just as you'd expect; something like > > "/Users/randy/Desktop/file.tar" > > I did the stringWithFormat: merely to quote the path, but upon reading the > docs

Re: NSTask failing

2008-04-04 Thread Randall Meadows
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:@"\"[EMAIL PROTECTED]"", tarFilePath], [NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", plistPath], nil];

Re: NSTask failing

2008-04-04 Thread Randall Meadows
On Apr 4, 2008, at 2:36 PM, Herb Petschauer wrote: On 04/04/2008, Randall Meadows <[EMAIL PROTECTED]> wrote: NSArray *args = [NSArray arrayWithObjects: @"-cf", [NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", tarFilePath], [NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", plistPath],

Re: NSTask failing

2008-04-04 Thread Herb Petschauer
On 04/04/2008, Randall Meadows <[EMAIL PROTECTED]> wrote: > I'm having problems with what should be a simple NSTask invocation: > > NSArray *args = [NSArray arrayWithObjects: >@"-cf", >[NSString stringWithFormat:@"\"[EMAIL PROTECTED]"", tarFilePath], >[NSString stringWithFormat:@"\"[EM

NSTask failing

2008-04-04 Thread Randall Meadows
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 launchedTask