bug 91519 not cleaning up temp file after running an executable (e.g. the dreaded 'incomplete message after JRE install' bug)

This commit is contained in:
dveditz%netscape.com 2001-08-16 10:34:03 +00:00
Родитель db0d8820a4
Коммит ada660c3e8
5 изменённых файлов: 11 добавлений и 6 удалений

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

@ -216,7 +216,10 @@ PRInt32 ScheduleFileForDeletion(nsIFile *filename)
strlen(fnamestr)+sizeof('\0'));
if ( err == REGERR_OK )
{
result = nsInstall::REBOOT_NEEDED;
nsSoftwareUpdate::NeedCleanup();
}
}
}
}
@ -401,7 +404,10 @@ PRInt32 ReplaceFileNowOrSchedule(nsIFile* replacementFile, nsIFile* doomedFile )
strlen(fdest)+sizeof('\0'));
if ( err == REGERR_OK && err2 == REGERR_OK )
{
result = nsInstall::REBOOT_NEEDED;
nsSoftwareUpdate::NeedCleanup();
}
else
NR_RegDeleteKey( reg, listkey, valname );
}

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

@ -855,7 +855,6 @@ nsInstall::FinalizeInstall(PRInt32* aReturn)
if ( rebootNeeded )
{
*aReturn = SaveError( REBOOT_NEEDED );
nsSoftwareUpdate::mNeedCleanup = PR_TRUE;
// Broadcast the fact that we have an incomplete install so
// parts of Mozilla can take defensive action if necessary.

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

@ -539,8 +539,8 @@ void
nsInstallFolder::AppendXPPath(const nsString& aRelativePath)
{
nsAutoString segment;
PRInt32 start = 0;
PRInt32 curr;
PRUint32 start = 0;
PRUint32 curr;
NS_ASSERTION(!aRelativePath.IsEmpty(),"InstallFolder appending null path");
do {

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

@ -596,7 +596,6 @@ nsInstallPatch::NativePatch(nsIFile *sourceFile, nsIFile *patchFile, nsIFile **n
{
PRInt64 fileSize;
outFileSpec->GetFileSize(&fileSize);
printf("filesize: %d\n", fileSize);
}

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

@ -46,6 +46,8 @@ class nsSoftwareUpdate: public nsISoftwareUpdate,
*/
static char* GetLogName() { return mLogName; }
static void NeedCleanup() { mNeedCleanup = PR_TRUE; }
NS_DECL_ISUPPORTS
NS_DECL_NSPIXPISTUBHOOK
NS_DECL_NSIOBSERVER
@ -74,12 +76,11 @@ class nsSoftwareUpdate: public nsISoftwareUpdate,
nsSoftwareUpdate();
virtual ~nsSoftwareUpdate();
static PRBool mNeedCleanup;
private:
static nsSoftwareUpdate* mInstance;
static nsCOMPtr<nsIFile> mProgramDir;
static char* mLogName;
static PRBool mNeedCleanup;
nsresult RunNextInstall();
nsresult RegisterNameset();