msi: Properties are case sensitive.

This commit is contained in:
Mike McCormack 2006-08-29 17:08:40 +09:00 committed by Alexandre Julliard
parent 95bb90326a
commit b183956193
2 changed files with 23 additions and 2 deletions

View File

@ -852,7 +852,7 @@ static UINT msi_prop_makehash( const WCHAR *str )
while( *str ) while( *str )
{ {
hash ^= tolowerW( *str++ ); hash ^= *str++;
hash *= 53; hash *= 53;
hash = (hash<<5) | (hash>>27); hash = (hash<<5) | (hash>>27);
} }
@ -865,7 +865,7 @@ static msi_property *msi_prop_find( MSIPACKAGE *package, LPCWSTR key )
msi_property *prop; msi_property *prop;
LIST_FOR_EACH_ENTRY( prop, &package->props[hash], msi_property, entry ) LIST_FOR_EACH_ENTRY( prop, &package->props[hash], msi_property, entry )
if (!lstrcmpiW( prop->key, key )) if (!lstrcmpW( prop->key, key ))
return prop; return prop;
return NULL; return NULL;
} }

View File

@ -1354,6 +1354,27 @@ static void test_props(void)
ok( !strcmp(buffer,"xy"), "buffer was not changed\n"); ok( !strcmp(buffer,"xy"), "buffer was not changed\n");
ok( sz == 3, "wrong size returned\n"); ok( sz == 3, "wrong size returned\n");
r = MsiSetProperty(hpkg, "SourceDir", "foo");
ok( r == ERROR_SUCCESS, "wrong return val\n");
sz = 4;
r = MsiGetProperty(hpkg, "SOURCEDIR", buffer, &sz);
ok( r == ERROR_SUCCESS, "wrong return val\n");
ok( !strcmp(buffer,""), "buffer wrong\n");
ok( sz == 0, "wrong size returned\n");
sz = 4;
r = MsiGetProperty(hpkg, "SOMERANDOMNAME", buffer, &sz);
ok( r == ERROR_SUCCESS, "wrong return val\n");
ok( !strcmp(buffer,""), "buffer wrong\n");
ok( sz == 0, "wrong size returned\n");
sz = 4;
r = MsiGetProperty(hpkg, "SourceDir", buffer, &sz);
ok( r == ERROR_SUCCESS, "wrong return val\n");
ok( !strcmp(buffer,"foo"), "buffer wrong\n");
ok( sz == 3, "wrong size returned\n");
MsiCloseHandle( hpkg ); MsiCloseHandle( hpkg );
DeleteFile(msifile); DeleteFile(msifile);
} }