From 032b1389b1d418c363c37ede2ccc178d14dfdeb9 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 14 Nov 2006 12:43:04 +0900 Subject: [PATCH] msi: Delete the tempfile created by GetTempFileName. --- dlls/msi/package.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 6f3815f07a5..15c39ca7cb2 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -498,13 +498,14 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPWSTR base_url ) static LPCWSTR copy_package_to_temp( LPCWSTR szPackage, LPWSTR filename ) { WCHAR path[MAX_PATH]; - static const WCHAR szMSI[] = {'M','S','I',0}; + static const WCHAR szMSI[] = {'m','s','i',0}; GetTempPathW( MAX_PATH, path ); GetTempFileNameW( path, szMSI, 0, filename ); if( !CopyFileW( szPackage, filename, FALSE ) ) { + DeleteFileW( filename ); ERR("failed to copy package %s\n", debugstr_w(szPackage) ); return szPackage; }