mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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:
parent
2e57e9f4a5
commit
502f98a507
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user