msi: Treat an empty install location as missing.

This commit is contained in:
Hans Leidekker 2013-05-07 15:00:55 +02:00 committed by Alexandre Julliard
parent 6a7bf66b29
commit b98ef8f087
1 changed files with 6 additions and 3 deletions

View File

@ -2305,9 +2305,12 @@ static WCHAR *get_install_location( MSIPACKAGE *package )
WCHAR *path;
if (!package->ProductCode) return NULL;
if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE ))
return NULL;
path = msi_reg_get_val_str( hkey, szInstallLocation );
if (MSIREG_OpenInstallProps( package->ProductCode, package->Context, NULL, &hkey, FALSE )) return NULL;
if ((path = msi_reg_get_val_str( hkey, szInstallLocation )) && !path[0])
{
msi_free( path );
path = NULL;
}
RegCloseKey( hkey );
return path;
}