зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
cfd018c19c
Коммит
ac811d37e0
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче