fixing bug #37168 - fixing the mac side of the bug. Install.Execute() now works on the Mac.

precheckin tests=passed
r=sgehani


git-svn-id: svn://10.0.0.236/trunk@71743 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ssu%netscape.com
2000-06-08 00:31:06 +00:00
parent 698b052669
commit a7a84d9a54

View File

@@ -1390,14 +1390,27 @@ nsLocalFile::MoveTo(nsIFile *newParentDir, const char *newName)
NS_IMETHODIMP
nsLocalFile::Spawn(const char **args, PRUint32 count)
{
OSErr err = noErr;
LaunchParamBlockRec launchPB;
PRBool isFile;
nsresult rv = IsFile(&isFile);
if (NS_FAILED(rv))
return rv;
launchPB.launchAppSpec = &mTargetSpec;
launchPB.launchAppParameters = NULL;
launchPB.launchBlockID = extendedBlock;
launchPB.launchEPBLength = extendedBlockLen;
launchPB.launchFileFlags = NULL;
launchPB.launchControlFlags = launchContinue + launchNoFileFlags + launchUseMinimum;
launchPB.launchControlFlags += launchDontSwitch;
return NS_ERROR_FILE_EXECUTION_FAILED;
err = LaunchApplication(&launchPB);
if (err != noErr)
return MacErrorMapper(err);
return NS_OK;
}
NS_IMETHODIMP
@@ -2376,8 +2389,11 @@ NS_IMETHODIMP nsLocalFile::GetInitType(nsLocalFileMacInitType *type)
NS_IMETHODIMP nsLocalFile::InitWithFSSpec(const FSSpec *fileSpec)
{
MakeDirty();
mSpec = *fileSpec;
mInitType = eInitWithFSSpec;
mSpec = *fileSpec;
mResolvedSpec = *fileSpec;
mTargetSpec = *fileSpec;
mAppendedPath = "";
mInitType = eInitWithFSSpec;
return NS_OK;
}