James Hawkins : msi: Set the source path for uncompressed files when loading the file.
Alexandre Julliard
julliard at winehq.org
Wed Jun 11 05:59:29 CDT 2008
Module: wine
Branch: master
Commit: d3cc801da113571be945e485e0d1bc1fa7be4931
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3cc801da113571be945e485e0d1bc1fa7be4931
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Tue Jun 10 17:35:10 2008 -0500
msi: Set the source path for uncompressed files when loading the file.
---
dlls/msi/action.c | 19 +++++++++++++++++++
dlls/msi/files.c | 28 +++-------------------------
2 files changed, 22 insertions(+), 25 deletions(-)
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)
More information about the wine-cvs
mailing list