msi: Resolve the target path for the ODBC driver file if necessary.

This commit is contained in:
Hans Leidekker 2012-05-08 09:30:02 +02:00 committed by Alexandre Julliard
parent 791a46658a
commit 32c7a52f5c
1 changed files with 5 additions and 0 deletions

View File

@ -6082,6 +6082,11 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param )
ptr += lstrlenW(ptr) + 1;
*ptr = '\0';
if (!driver_file->TargetPath)
{
const WCHAR *dir = msi_get_target_folder( package, driver_file->Component->Directory );
driver_file->TargetPath = msi_build_directory_name( 2, dir, driver_file->FileName );
}
driver_path = strdupW(driver_file->TargetPath);
ptr = strrchrW(driver_path, '\\');
if (ptr) *ptr = '\0';