diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 4b20d74..f319427 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1464,6 +1464,25 @@ static UINT load_file(MSIRECORD *row, LPVOID param) file->IsCompressed = package->WordCount & MSIWORDCOUNT_COMPRESSED; } + if (!file->IsCompressed) + { + LPWSTR p, path; + + p = resolve_folder(package, file->Component->Directory, + TRUE, FALSE, TRUE, NULL); + path = build_directory_name(2, p, file->ShortName); + + if (file->LongName && + GetFileAttributesW(path) == INVALID_FILE_ATTRIBUTES) + { + msi_free(path); + path = build_directory_name(2, p, file->LongName); + } + + file->SourcePath = path; + msi_free(p); + } + load_file_hash(package, file); TRACE("File Loaded (%s)\n",debugstr_w(file->File)); diff --git a/dlls/msi/files.c b/dlls/msi/files.c index ae7f3f0..64869b1 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -459,26 +459,6 @@ done: return ret; } -static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, LPCWSTR path) -{ - if (!file->IsCompressed) - { - LPWSTR p, path; - p = resolve_folder(package, file->Component->Directory, TRUE, FALSE, TRUE, NULL); - path = build_directory_name(2, p, file->ShortName); - if (file->LongName && - INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path )) - { - msi_free(path); - path = build_directory_name(2, p, file->LongName); - } - file->SourcePath = path; - msi_free(p); - } - else - file->SourcePath = build_directory_name(2, path, file->File); -} - void msi_free_media_info( MSIMEDIAINFO *mi ) { msi_free( mi->disk_prompt ); @@ -847,13 +827,11 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) } } - set_file_source(package, file, mi->source); - - TRACE("file paths %s to %s\n",debugstr_w(file->SourcePath), - debugstr_w(file->TargetPath)); - if (!file->IsCompressed) { + TRACE("file paths %s to %s\n", debugstr_w(file->SourcePath), + debugstr_w(file->TargetPath)); + msi_file_update_ui(package, file, szInstallFiles); rc = copy_install_file(file); if (rc != ERROR_SUCCESS) -- 1.5.4.3