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
parent 2e57e9f4a5
commit 502f98a507
2 changed files with 30 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}