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