msi: Don't mark uncompressed global assembly files as installed until they are in the assembly cache.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2018-02-07 10:46:09 +01:00 committed by Alexandre Julliard
parent 35af567d0b
commit ff754f4ede
1 changed files with 6 additions and 6 deletions

View File

@ -200,8 +200,6 @@ static UINT copy_file(MSIFILE *file, LPWSTR source)
return GetLastError();
SetFileAttributesW(file->TargetPath, FILE_ATTRIBUTE_NORMAL);
file->state = msifs_installed;
return ERROR_SUCCESS;
}
@ -249,7 +247,6 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
MoveFileExW(file->TargetPath, NULL, MOVEFILE_DELAY_UNTIL_REBOOT) &&
MoveFileExW(tmpfileW, file->TargetPath, MOVEFILE_DELAY_UNTIL_REBOOT))
{
file->state = msifs_installed;
package->need_reboot_at_end = 1;
gle = ERROR_SUCCESS;
}
@ -365,6 +362,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
{
BOOL is_global_assembly = msi_is_global_assembly( file->Component );
msi_file_update_ui( package, file, szInstallFiles );
rc = msi_load_media_info( package, file->Sequence, mi );
@ -412,7 +411,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
if (!msi_is_global_assembly( file->Component ))
if (!is_global_assembly)
{
msi_create_directory(package, file->Component->Directory);
}
@ -424,10 +423,11 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
msi_free(source);
goto done;
}
if (!is_global_assembly) file->state = msifs_installed;
msi_free(source);
}
else if (!msi_is_global_assembly( file->Component ) &&
file->state != msifs_installed && !(file->Attributes & msidbFileAttributesPatchAdded))
else if (!is_global_assembly && file->state != msifs_installed &&
!(file->Attributes & msidbFileAttributesPatchAdded))
{
ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
rc = ERROR_INSTALL_FAILURE;