Mike McCormack : msi: Delete the tempfile created by GetTempFileName.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 14 05:14:29 CST 2006


Module: wine
Branch: master
Commit: 032b1389b1d418c363c37ede2ccc178d14dfdeb9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=032b1389b1d418c363c37ede2ccc178d14dfdeb9

Author: Mike McCormack <mike at codeweavers.com>
Date:   Tue Nov 14 12:43:04 2006 +0900

msi: Delete the tempfile created by GetTempFileName.

---

 dlls/msi/package.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 6f3815f..15c39ca 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -498,13 +498,14 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABA
 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;
     }




More information about the wine-cvs mailing list