Re: FSRefMakePath: error -35
Re: FSRefMakePath: error -35
- Subject: Re: FSRefMakePath: error -35
- From: Lawrence Sanbourne <email@hidden>
- Date: Sun, 23 Oct 2005 00:23:41 -0500
On 10/22/05, Rosyna <email@hidden> wrote:
> Well, that's why it is failing. You're passing a random pointer to an
> FSRef. You want to use FSPathMakeRef instead of FSRefMakePath.
Wait, though. I'm trying to call my function recursively, but it takes
an NSString * as an argument. fetched->fFSRefs[thisIndex] is not an
unitialized pointer because it was set by FSGetCatalogInfoBulk. So
don't I need FSRefMakePath ("Converts an FSRef into a path," according
to the documentation)?
Code:
UInt8 utf8Path[PATH_MAX*6];
OSStatus makePathErr = FSRefMakePath(&fetched->fFSRefs[thisIndex],
utf8Path, PATH_MAX*6);
if (makePathErr == noErr)
totalSize += LSDirectorySizeAtPath([NSString
stringWithUTF8String:(char *)utf8Path]);
else
NSLog(@"LSDirectorySizeAtPath: Error making FSRef into path: error
%d", makePathErr);
Thanks,
Larry
--
Larry Sanbourne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden