}
else
{
- /* source may be in a few different places ... check each of them */
path = NULL;
- /* try the long path directory */
- if (f->SourceLongPath)
- {
- path = build_directory_name( 3, p, f->SourceLongPath, NULL );
- if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
- {
- msi_free( path );
- path = NULL;
- }
- }
-
- /* try the short path directory */
- if (!path && f->SourceShortPath)
- {
- path = build_directory_name( 3, p, f->SourceShortPath, NULL );
- if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW( path ))
- {
- msi_free( path );
- path = NULL;
- }
- }
-
- /* try the root of the install */
- if (!path)
+ if (package->WordCount & msidbSumInfoSourceTypeCompressed)
path = get_source_root( package );
+ else if (package->WordCount & msidbSumInfoSourceTypeSFN)
+ path = build_directory_name( 3, p, f->SourceShortPath, NULL );
+ else
+ path = build_directory_name( 3, p, f->SourceLongPath, NULL );
TRACE("source -> %s\n", debugstr_w(path));
f->ResolvedSource = strdupW( path );