Is CpMac sick?
Is CpMac sick?
- Subject: Is CpMac sick?
- From: Steve Gehrman <email@hidden>
- Date: Thu, 28 Jun 2001 20:44:25 -0700
I've been trying to get CpMac to work. It works for some small files
and folders, but on one of my folders CpMac returns with this....
"could not open the destination file (-5000)"
In another case I call CpMac repeatedly as I enumerate over a folder,
for some reason after 6mbs of successful copying my code trys to
allocate a pipe and it returns nil ie....
errorPipe randomly returns nil and the debugger complains when I set nil
to StandardError. anyone else seen this kind of behavior. I'm using
the same NSTask code for many other tasks which have never given me
problems.
BOOL result;
NSTask *task = [[ NSTask alloc ] init ];
NSPipe *outputPipe = [[NSPipe alloc] init];
NSPipe *errorPipe = [[NSPipe alloc] init];
NSFileHandle *readHandle;
NSData *availableData;
NSString* outString;
[ task setCurrentDirectoryPath: currentDirectory ];
[ task setLaunchPath:toolPath];
[ task setArguments: args ];
[ task setStandardOutput: outputPipe ];
[task setStandardError:errorPipe];
steve