Commit 7b7c9542 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Make sure the source directory has a trailing backslash.

parent 806e4071
...@@ -712,6 +712,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi) ...@@ -712,6 +712,7 @@ UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
msi_set_sourcedir_props(package, FALSE); msi_set_sourcedir_props(package, FALSE);
source_dir = msi_dup_property(package->db, szSourceDir); source_dir = msi_dup_property(package->db, szSourceDir);
lstrcpyW(mi->sourcedir, source_dir); lstrcpyW(mi->sourcedir, source_dir);
PathAddBackslashW(mi->sourcedir);
mi->type = get_drive_type(source_dir); mi->type = get_drive_type(source_dir);
options = MSICODE_PRODUCT; options = MSICODE_PRODUCT;
...@@ -797,6 +798,7 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi) ...@@ -797,6 +798,7 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
} }
lstrcpyW(mi->sourcedir, volume); lstrcpyW(mi->sourcedir, volume);
PathAddBackslashW(mi->sourcedir);
TRACE("Found network source %s\n", debugstr_w(mi->sourcedir)); TRACE("Found network source %s\n", debugstr_w(mi->sourcedir));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
...@@ -827,6 +829,7 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi) ...@@ -827,6 +829,7 @@ static UINT find_published_source(MSIPACKAGE *package, MSIMEDIAINFO *mi)
{ {
/* FIXME: what about SourceDir */ /* FIXME: what about SourceDir */
lstrcpyW(mi->sourcedir, source); lstrcpyW(mi->sourcedir, source);
PathAddBackslashW(mi->sourcedir);
TRACE("Found disk source %s\n", debugstr_w(mi->sourcedir)); TRACE("Found disk source %s\n", debugstr_w(mi->sourcedir));
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
...@@ -866,6 +869,7 @@ UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, MSIMEDIA ...@@ -866,6 +869,7 @@ UINT ready_media(MSIPACKAGE *package, UINT Sequence, BOOL IsCompressed, MSIMEDIA
} }
if ((p = strrchrW(temppath, '\\'))) *p = 0; if ((p = strrchrW(temppath, '\\'))) *p = 0;
strcpyW(mi->sourcedir, temppath); strcpyW(mi->sourcedir, temppath);
PathAddBackslashW(mi->sourcedir);
msi_free(mi->cabinet); msi_free(mi->cabinet);
mi->cabinet = strdupW(p + 1); mi->cabinet = strdupW(p + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment