mirror of
https://github.com/reactos/reactos.git
synced 2026-07-05 22:44:22 +08:00
If download if canceled, delete temporary file
svn path=/trunk/; revision=31462
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user