[comp.sys.mac.programmer] PBSetCatInfo fails where PBGetCatInfo succeeds

pete@cavevax.ucsb.edu (Pete Gontier) (11/13/89)

Under what circumstances PBSetCatInfo will fail (with a return of -43, file
not found) on data obtained from PBGetCatInfo? I'm trying to twiddle a
folder's desktop location, and the call fails even if I don't bother to change
those coordinates.

Here's some contextual info:

{ CheckErr is a function taking an OSErr, returning a boolean according }
{ to the OSErr, with some user-feedback side effects. }

PROCEDURE Traverse (theDirID: integer; dirName: Str31);
	begin
		...
		cipbr.ioFDirIndex := -1; { useful for unlisted recursion }
		IF CheckErr(PBSetCatInfo(@cipbr, false)) THEN
		...
	end;

begin
	...
	WITH cipbr DO
		BEGIN
			ioVRefNum := 0;
			ioDrDirID := 2;
			ioFDirIndex := -1;
			ioNamePtr := @volName;
		END;
 
	IF CheckErr(PBGetCatInfo(@cipbr, false)) THEN
		Traverse(2, volName);
	...
end.

I hope someone has a good answer for this, because it is holding up two
separate projects of mine.
--
Pete Gontier   : pete@cavevax.ucsb.edu; outgoing .UUCP cause me grief
Editor, Macker : Online Macintosh Programming Journal; mail for subscription
Hire this kid  : Mac, DOS, C, Pascal, asm, excellent communication skills

"This was it. This was what he was, who he was, his being. He forgot to eat.
 Sometimes he'd resent having to leave the deck to use the toilet..."
                                              -- William Gibson, _Neuromancer_