Module: wine Branch: master Commit: 3ef703ad6c0632d7fa48143b5fad80d704f2162f URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ef703ad6c0632d7fa48143b5f...
Author: Mike McCormack mike@codeweavers.com Date: Mon Nov 13 16:35:22 2006 +0900
msi: Track temp files as soon as they are created.
---
dlls/msi/custom.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 18a8304..e80c488 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -307,6 +307,7 @@ static UINT store_binary_to_temp(MSIPACK TRACE("Unable to create file\n"); return ERROR_FUNCTION_FAILED; } + track_tempfile(package, tmp_file, tmp_file);
/* write out the file */ file = CreateFileW(tmp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, @@ -327,7 +328,6 @@ static UINT store_binary_to_temp(MSIPACK { ERR("Failed to get stream\n"); CloseHandle(file); - DeleteFileW(tmp_file); break; } WriteFile(file, buffer, sz, &write, NULL); @@ -549,11 +549,6 @@ static UINT HANDLE_CustomType1(MSIPACKAG
r = process_handle(package, type, ThreadHandle, NULL, action, &finished );
- if (!finished) - track_tempfile(package, tmp_file, tmp_file); - else - DeleteFileW(tmp_file); - return r; }
@@ -612,11 +607,6 @@ static UINT HANDLE_CustomType2(MSIPACKAG r = process_handle(package, type, info.hThread, info.hProcess, action, &finished);
- if (!finished) - track_tempfile(package, tmp_file, tmp_file); - else - DeleteFileW(tmp_file); - return r; }