msi: Remove track_tempfile()'s unused 2nd parameter.
This commit is contained in:
parent
f241daef54
commit
c88c0b453d
|
@ -307,7 +307,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source,
|
|||
TRACE("Unable to create file\n");
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
track_tempfile(package, tmp_file, tmp_file);
|
||||
track_tempfile(package, tmp_file);
|
||||
|
||||
row = MSI_QueryGetRecord(package->db, query, source);
|
||||
if (!row)
|
||||
|
|
|
@ -123,7 +123,7 @@ static UINT writeout_cabinet_stream(MSIPACKAGE *package, LPCWSTR stream_name,
|
|||
|
||||
GetTempFileNameW(tmp,stream_name,0,source);
|
||||
|
||||
track_tempfile(package,strrchrW(source,'\\'), source);
|
||||
track_tempfile(package, source);
|
||||
the_file = CreateFileW(source, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
|
|
|
@ -108,39 +108,30 @@ MSIFILE* get_loaded_file( MSIPACKAGE* package, LPCWSTR key )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int track_tempfile( MSIPACKAGE *package, LPCWSTR name, LPCWSTR path )
|
||||
int track_tempfile( MSIPACKAGE *package, LPCWSTR path )
|
||||
{
|
||||
MSITEMPFILE *temp;
|
||||
|
||||
TRACE("%s\n", debugstr_w(path));
|
||||
|
||||
LIST_FOR_EACH_ENTRY( temp, &package->tempfiles, MSITEMPFILE, entry )
|
||||
{
|
||||
if (lstrcmpW( name, temp->File )==0)
|
||||
{
|
||||
TRACE("tempfile %s already exists with path %s\n",
|
||||
debugstr_w(temp->File), debugstr_w(temp->Path));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!lstrcmpW( path, temp->Path ))
|
||||
return 0;
|
||||
|
||||
temp = msi_alloc_zero( sizeof (MSITEMPFILE) );
|
||||
if (!temp)
|
||||
return -1;
|
||||
|
||||
list_add_head( &package->tempfiles, &temp->entry );
|
||||
|
||||
temp->File = strdupW( name );
|
||||
temp->Path = strdupW( path );
|
||||
|
||||
TRACE("adding tempfile %s with path %s\n",
|
||||
debugstr_w(temp->File), debugstr_w(temp->Path));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir )
|
||||
{
|
||||
MSIFOLDER *folder;
|
||||
|
||||
|
||||
LIST_FOR_EACH_ENTRY( folder, &package->folders, MSIFOLDER, entry )
|
||||
{
|
||||
if (lstrcmpW( dir, folder->Directory )==0)
|
||||
|
@ -407,7 +398,6 @@ static void remove_tracked_tempfiles(MSIPACKAGE* package)
|
|||
TRACE("deleting temp file %s\n", debugstr_w( temp->Path ));
|
||||
if (!DeleteFileW( temp->Path ))
|
||||
ERR("failed to delete %s\n", debugstr_w( temp->Path ));
|
||||
msi_free( temp->File );
|
||||
msi_free( temp->Path );
|
||||
msi_free( temp );
|
||||
}
|
||||
|
|
|
@ -366,7 +366,6 @@ typedef struct tagMSIFILE
|
|||
typedef struct tagMSITEMPFILE
|
||||
{
|
||||
struct list entry;
|
||||
LPWSTR File;
|
||||
LPWSTR Path;
|
||||
} MSITEMPFILE;
|
||||
|
||||
|
@ -751,7 +750,7 @@ extern MSICOMPONENT *get_loaded_component( MSIPACKAGE* package, LPCWSTR Componen
|
|||
extern MSIFEATURE *get_loaded_feature( MSIPACKAGE* package, LPCWSTR Feature );
|
||||
extern MSIFILE *get_loaded_file( MSIPACKAGE* package, LPCWSTR file );
|
||||
extern MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir );
|
||||
extern int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path);
|
||||
extern int track_tempfile(MSIPACKAGE *package, LPCWSTR path);
|
||||
extern UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action);
|
||||
extern void msi_free_action_script(MSIPACKAGE *package, UINT script);
|
||||
extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR);
|
||||
|
|
Loading…
Reference in New Issue