msi: Only use the long name for the file source if the file has one.

This commit is contained in:
Rob Shearman 2007-06-21 17:19:57 +01:00 committed by Alexandre Julliard
parent 025ea7dab2
commit f533159bb6
1 changed files with 2 additions and 1 deletions

View File

@ -467,7 +467,8 @@ static VOID set_file_source(MSIPACKAGE* package, MSIFILE* file, LPCWSTR path)
LPWSTR p, path;
p = resolve_folder(package, file->Component->Directory, TRUE, FALSE, TRUE, NULL);
path = build_directory_name(2, p, file->ShortName);
if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
if (file->LongName &&
INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
{
msi_free(path);
path = build_directory_name(2, p, file->LongName);