Fix #103612 - work around bug in Mac OS X 10.1 Internet prefs panel when setting DL folder. r=dbaron. I'd wait for an sr= but I need trunk verification on this so I can get PDT approval for checking into the 0.9.4 branch.

This commit is contained in:
sdagley%netscape.com 2001-10-08 04:59:59 +00:00
Родитель cfd018c19c
Коммит ac811d37e0
2 изменённых файлов: 30 добавлений и 0 удалений

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

@ -477,8 +477,23 @@ NS_IMETHODIMP nsInternetConfigService::GetDownloadFolder(FSSpec *fsspec)
{
rv = NS_OK;
}
else
{ // ResolveAlias for the DownloadFolder failed - try grabbing the FSSpec
err = ::ICFindPrefHandle(inst, kICDownloadFolder, &attr, prefH);
if (err == noErr)
{ // Use FSMakeFSSpec to verify the saved FSSpec is still valid
err = ::FSMakeFSSpec((*(ICFileSpecHandle)prefH)->fss.vRefNum,
(*(ICFileSpecHandle)prefH)->fss.parID,
(*(ICFileSpecHandle)prefH)->fss.name,
fsspec);
if (err == noErr)
rv = NS_OK;
}
}
}
}
// Best not to leave that handle laying around
DisposeHandle(prefH);
}
err = ::ICEnd(inst);
}

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

@ -477,8 +477,23 @@ NS_IMETHODIMP nsInternetConfigService::GetDownloadFolder(FSSpec *fsspec)
{
rv = NS_OK;
}
else
{ // ResolveAlias for the DownloadFolder failed - try grabbing the FSSpec
err = ::ICFindPrefHandle(inst, kICDownloadFolder, &attr, prefH);
if (err == noErr)
{ // Use FSMakeFSSpec to verify the saved FSSpec is still valid
err = ::FSMakeFSSpec((*(ICFileSpecHandle)prefH)->fss.vRefNum,
(*(ICFileSpecHandle)prefH)->fss.parID,
(*(ICFileSpecHandle)prefH)->fss.name,
fsspec);
if (err == noErr)
rv = NS_OK;
}
}
}
}
// Best not to leave that handle laying around
DisposeHandle(prefH);
}
err = ::ICEnd(inst);
}