Author: pschweitzer
Date: Thu Dec 27 20:06:30 2007
New Revision: 31462
URL:
http://svn.reactos.org/svn/reactos?rev=31462&view=rev
Log:
If download if canceled, delete temporary file
Modified:
trunk/rosapps/downloader/download.c
Modified: trunk/rosapps/downloader/download.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/download.c?rev=…
==============================================================================
--- trunk/rosapps/downloader/download.c (original)
+++ trunk/rosapps/downloader/download.c Thu Dec 27 20:06:30 2007
@@ -316,17 +316,22 @@
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;