Fix for bug#6662 "PR_Open does not set hpb.fileParam.ioDirID field".

This commit is contained in:
gordon%netscape.com 1999-05-20 03:58:42 +00:00
Родитель d8abc02a19
Коммит 03dc59061b
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -357,9 +357,10 @@ PRInt32 _MD_Open(const char *path, PRIntn flags, int mode)
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;
@ -367,12 +368,11 @@ PRInt32 _MD_Open(const char *path, PRIntn flags, int mode)
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)