Fwd: FSRefMakePath: error -35
Fwd: FSRefMakePath: error -35
- Subject: Fwd: FSRefMakePath: error -35
- From: Lawrence Sanbourne <email@hidden>
- Date: Sun, 23 Oct 2005 01:09:02 -0500
Oh duh. You're right; I was looking in the wrong place.
-ls
---------- Forwarded message ----------
From: Lawrence Sanbourne <email@hidden>
Date: Oct 23, 2005 12:23 AM
Subject: Re: FSRefMakePath: error -35
To: Rosyna <email@hidden>
Cc: Finlay Dobbie <email@hidden>, email@hidden
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
--
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