Remove tempfile used to download Mozilla ActiveX control once it's not
used anymore.
This commit is contained in:
parent
e595ff24c7
commit
3eb08c44e7
|
@ -315,6 +315,7 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
DWORD r, sz, type;
|
DWORD r, sz, type;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
BOOL bCancelled = FALSE;
|
BOOL bCancelled = FALSE;
|
||||||
|
BOOL bTempfile = FALSE;
|
||||||
|
|
||||||
/* find the name of the thing to download */
|
/* find the name of the thing to download */
|
||||||
szUrl[0] = 0;
|
szUrl[0] = 0;
|
||||||
|
@ -338,6 +339,7 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
strcatW( path, p+1 );
|
strcatW( path, p+1 );
|
||||||
|
|
||||||
/* download it */
|
/* download it */
|
||||||
|
bTempfile = TRUE;
|
||||||
dl = create_dl(info, &bCancelled);
|
dl = create_dl(info, &bCancelled);
|
||||||
r = URLDownloadToFileW( NULL, szUrl, path, 0, dl );
|
r = URLDownloadToFileW( NULL, szUrl, path, 0, dl );
|
||||||
if( dl )
|
if( dl )
|
||||||
|
@ -354,6 +356,8 @@ static DWORD WINAPI ThreadFunc( LPVOID info )
|
||||||
WaitForSingleObject( pi.hProcess, INFINITE );
|
WaitForSingleObject( pi.hProcess, INFINITE );
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
if( bTempfile )
|
||||||
|
DeleteFileW( path );
|
||||||
EndDialog( hDlg, 0 );
|
EndDialog( hDlg, 0 );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue