Fix for bug#6662 "PR_Open does not set hpb.fileParam.ioDirID field". XPCOM21_BASE
authorgordon%netscape.com
Thu, 20 May 1999 03:58:42 +0000
changeset 632 739366dc13f08c25774c606921d9d166b2591784
parent 631 bf9f8bd07d33088a8eb9277dfd6ac8a9c5e5ae2b
child 633 28f592e7e2d51acec67eb9f077a8c7245b871a28
child 634 fdf058d383ff86d7f0ce4999bc5c32fa07dc67ed
push idunknown
push userunknown
push dateunknown
bugs6662
Fix for bug#6662 "PR_Open does not set hpb.fileParam.ioDirID field".
pr/src/md/mac/macio.c
--- a/pr/src/md/mac/macio.c
+++ b/pr/src/md/mac/macio.c
@@ -352,32 +352,32 @@ PRInt32 _MD_Open(const char *path, PRInt
     err = ConvertUnixPathToMacPath(path, &macFileName);
 	
 	if (err != noErr)
 		goto ErrorExit;
 
 	hpb.ioParam.ioCompletion	= NULL;
 	PStrFromCStr(macFileName, pascalName);
 	PR_DELETE(macFileName);
-	hpb.ioParam.ioNamePtr 		= pascalName;
-	hpb.ioParam.ioVRefNum 		= 0;
-	hpb.ioParam.ioVersNum 		= 0;
+	hpb.ioParam.ioNamePtr 	= pascalName;
+	hpb.ioParam.ioVRefNum 	= 0;
+	hpb.ioParam.ioVersNum 	= 0;
+	hpb.fileParam.ioDirID	= 0;
 
 	if (flags & PR_RDWR)
 		perm = fsRdWrPerm;
 	else if (flags & PR_WRONLY)
 		perm = fsWrPerm;
 	else
 		perm = fsRdPerm;	
-	hpb.ioParam.ioPermssn 		= perm;
+	hpb.ioParam.ioPermssn 	= perm;
 
-	hpb.ioParam.ioMisc			= NULL;
 	
 open:
-	err = PBHOpenSync(&hpb);
+	err = PBHOpenDFSync(&hpb);
 	if ((err == fnfErr) && (flags & PR_CREATE_FILE)) {
 		err = PBHCreateSync(&hpb);
 		if (err == noErr)
 			goto open;
 	}
 	if (err != noErr)
 		goto ErrorExit;