mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
If download if canceled, delete temporary file
svn path=/trunk/; revision=31462
This commit is contained in:
parent
3dce2f69c7
commit
5778b4df0d
1 changed files with 16 additions and 11 deletions
|
@ -316,17 +316,22 @@ ThreadFunc(LPVOID Context)
|
|||
end:
|
||||
if (bTempfile)
|
||||
{
|
||||
DWORD dwSize = sizeof(DWORD);
|
||||
DWORD dwValue, dwType = REG_DWORD;
|
||||
if (RegQueryValueEx(hKey,
|
||||
L"DeleteInstaller",
|
||||
NULL,
|
||||
&dwType,
|
||||
(LPBYTE)&dwValue,
|
||||
&dwSize) == ERROR_SUCCESS)
|
||||
if (dwValue == 0x1)
|
||||
DeleteFileW(path);
|
||||
RegCloseKey(hKey);
|
||||
if (bCancelled)
|
||||
DeleteFileW(path);
|
||||
else
|
||||
{
|
||||
DWORD dwSize = sizeof(DWORD);
|
||||
DWORD dwValue, dwType = REG_DWORD;
|
||||
if (RegQueryValueEx(hKey,
|
||||
L"DeleteInstaller",
|
||||
NULL,
|
||||
&dwType,
|
||||
(LPBYTE)&dwValue,
|
||||
&dwSize) == ERROR_SUCCESS)
|
||||
if (dwValue == 0x1)
|
||||
DeleteFileW(path);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
EndDialog(Dlg, 0);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue