mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 02:58:20 +00:00
msi: Delete the tempfile created by GetTempFileName.
This commit is contained in:
parent
3c2e79e727
commit
032b1389b1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue