Bug 172223 - Mach-0 impl of nsLocalFile::Reveal() does not work because passing an FSRef in the Apple Event does not work - it must be an FSSpec. r=sdagley/sr=sfraser/a=dbaron

This commit is contained in:
ccarlen%netscape.com 2002-10-18 01:59:54 +00:00
Родитель 8d2fc1a5ca
Коммит 7930af8ba1
1 изменённых файлов: 13 добавлений и 14 удалений

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

@ -1552,26 +1552,25 @@ NS_IMETHODIMP nsLocalFile::Reveal()
err = ::FindRunningAppBySignature ('MACS', process);
if (err == noErr) {
err = ::AECreateDesc(typeProcessSerialNumber, (Ptr)&process, sizeof(process), &myAddressDesc);
if (err == noErr)
{
if (err == noErr) {
// Create the FinderEvent
err = ::AECreateAppleEvent(kAEMiscStandards, kAEMakeObjectsVisible, &myAddressDesc,
kAutoGenerateReturnID, kAnyTransactionID, &aeEvent);
if (err == noErr) {
// Create the file list
err = ::AECreateList(nil, 0, false, &fileList);
if (err == noErr)
{
err = ::AEPutPtr(&fileList, 0, typeFSRef, &fsRefToReveal, sizeof(FSRef));
if (err == noErr)
{
err = ::AEPutParamDesc(&aeEvent, keyDirectObject, &fileList);
if (err == noErr)
{
err = ::AESend(&aeEvent, &aeReply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, nil, nil);
if (err == noErr)
::SetFrontProcess(&process);
if (err == noErr) {
FSSpec fsSpecToReveal;
err = ::FSRefMakeFSSpec(&fsRefToReveal, &fsSpecToReveal);
if (err == noErr) {
err = ::AEPutPtr(&fileList, 0, typeFSS, &fsSpecToReveal, sizeof(FSSpec));
if (err == noErr) {
err = ::AEPutParamDesc(&aeEvent, keyDirectObject, &fileList);
if (err == noErr) {
err = ::AESend(&aeEvent, &aeReply, kAENoReply, kAENormalPriority, kAEDefaultTimeout, nil, nil);
if (err == noErr)
::SetFrontProcess(&process);
}
}
}
}