On 7/29/05 2:20 PM, Steve Mills didst favor us with:
> If spec refers to a file that does NOT exist, but the parent
> directory (spec->parID) DOES exist, should this work?
I don't know, but it's a lot of work. I always used this:
FSMakeFSSpec( fss.vRefNum, fss.parID, "\p", &folder );
>
> OSErr FSpGetParent(FSSpec* spec)
> {
> CInfoPBRec pb;
> DirInfo* dirRec = (DirInfo*)&pb;
> OSErr err;
> Str255 s;
>
> PStrCopy(spec->name, s);
> dirRec->ioCompletion = nil;
> dirRec->ioNamePtr = s;
> dirRec->ioVRefNum = spec->vRefNum;
> dirRec->ioFDirIndex = -1;
> dirRec->ioDrDirID = spec->parID;
> err = PBGetCatInfoSync(&pb);
>
> if(err == noErr)
> err = FSMakeFSSpec(dirRec->ioVRefNum, dirRec->ioDrParID, s,
> spec);
>
> return err;
> }
>
> Should err returned from PBGetcatInfoSync be noErr or fnfErr, and
> should ioDrParID contain the parent directory upon completion?
>
> I have a customer who is getting random problems when saving
> documents. We create a temp file in kTemporaryFolderType. Calling our
> FSpGetParent routine on a nonexistent file seems to work most of the
> time, but sometimes returns fnfErr. At this point I don't know which
> call in FSpGetParent is returning the fnfErr, so I'm adding more
> logging to a build for the customer.
>
> They say the volume where these files reside are on an external
> FireWire drive connected to their OSX server. Is it possible that the
> TemporaryItems folder is being deleted between the time we call
> FindFolder and the call to FSpGetParent (which should be only
> microseconds apart from each other)?
No. It would be useless if that were the case.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden