http://bugs.winehq.org/show_bug.cgi?id=13838
--- Comment #33 from max@veneto.com 2008-07-04 14:58:41 --- (In reply to comment #32)
(In reply to comment #30)
(In reply to comment #29)
If you could write a conformance test to expose and verify the problem first, that would be cool.
Sorry, not able to write the test, my skills on MSI are too limited :-) But it should be logic enough that MSI global path properties as "CommonAppDataFolder" and MSI local path properties (as "LOCALAPPDATAFOLDER") should be returned in a consistent way. As the first where already returned by design WITH a trailing backslash, I made the latter to do so.
It's not logical at all. One property is set by the folder code, and the other is set by the AppSearch action. I'm not saying that the change is wrong, but it has to be backed up by a test. Guessing the behavior of the Win32 API is what causes bugs. If you can't write a test, then I'll whip something up over the weekend.
dlls/msi/package.c :
static VOID set_installer_properties(MSIPACKAGE *package) { ............. SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth); strcatW(pth,cszbs); <=====================HERE MSI_SetPropertyW(package, CADF, pth); ............ }
dlls/msi/appsearch.c :
static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNATURE *sig) { ................ value = msi_alloc( sz ); rc = RegQueryValueExW(key, valueName, NULL, ®Type, value, &sz); ................. switch (type & 0x0f) { case msidbLocatorTypeDirectory: rc = ACTION_SearchDirectory(package, sig, (LPWSTR)value, 0, appValue); break; ............... }
Well, if you think that's more logical return the same stuff in 2 different ways..... Btw, autocad installer expects it WITH a trailing backslash, so it must be like that. As I excluded a registry difference (checked with windows one...) and a path function difference (on that one i DID make a test and it's right, without the backslash), the only place on which the backslash can appear is here. And, if somebody added backslashes in set_installer_properties() there should be a reason..... BTW, I'm not able to make a testcase, as I already told you. If you can, I'll be glad.
Max