mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 08:54:40 +00:00
If the section name contained a dot, sometimes the right section to install was not found
svn path=/trunk/; revision=22150
This commit is contained in:
parent
68f041d222
commit
4123274547
|
@ -93,6 +93,7 @@ struct GetSectionCallbackInfo
|
||||||
PSP_ALTPLATFORM_INFO PlatformInfo;
|
PSP_ALTPLATFORM_INFO PlatformInfo;
|
||||||
BYTE ProductType;
|
BYTE ProductType;
|
||||||
WORD SuiteMask;
|
WORD SuiteMask;
|
||||||
|
DWORD PrefixLength;
|
||||||
WCHAR BestSection[LINE_LEN + 1];
|
WCHAR BestSection[LINE_LEN + 1];
|
||||||
DWORD BestScore1, BestScore2, BestScore3, BestScore4, BestScore5;
|
DWORD BestScore1, BestScore2, BestScore3, BestScore4, BestScore5;
|
||||||
};
|
};
|
||||||
|
@ -1052,7 +1053,7 @@ CheckSectionValid(
|
||||||
* Field[5] Suite mask
|
* Field[5] Suite mask
|
||||||
* Remark: lastests fields may be NULL if the information is not provided
|
* Remark: lastests fields may be NULL if the information is not provided
|
||||||
*/
|
*/
|
||||||
Fields[0] = strchrW(Section, '.');
|
Fields[0] = Section;
|
||||||
if (Fields[0] == NULL)
|
if (Fields[0] == NULL)
|
||||||
{
|
{
|
||||||
TRACE("No extension found\n");
|
TRACE("No extension found\n");
|
||||||
|
@ -1209,8 +1210,11 @@ GetSectionCallback(
|
||||||
DWORD Score1, Score2, Score3, Score4, Score5;
|
DWORD Score1, Score2, Score3, Score4, Score5;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
|
if (SectionName[info->PrefixLength] != '.')
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
ret = CheckSectionValid(
|
ret = CheckSectionValid(
|
||||||
SectionName,
|
&SectionName[info->PrefixLength],
|
||||||
info->PlatformInfo,
|
info->PlatformInfo,
|
||||||
info->ProductType,
|
info->ProductType,
|
||||||
info->SuiteMask,
|
info->SuiteMask,
|
||||||
|
@ -1318,6 +1322,7 @@ SetupDiGetActualSectionToInstallExW(
|
||||||
CallbackInfo.PlatformInfo = pPlatformInfo;
|
CallbackInfo.PlatformInfo = pPlatformInfo;
|
||||||
CallbackInfo.ProductType = ProductType;
|
CallbackInfo.ProductType = ProductType;
|
||||||
CallbackInfo.SuiteMask = SuiteMask;
|
CallbackInfo.SuiteMask = SuiteMask;
|
||||||
|
CallbackInfo.PrefixLength = strlenW(InfSectionName);
|
||||||
CallbackInfo.BestScore1 = ULONG_MAX;
|
CallbackInfo.BestScore1 = ULONG_MAX;
|
||||||
CallbackInfo.BestScore2 = ULONG_MAX;
|
CallbackInfo.BestScore2 = ULONG_MAX;
|
||||||
CallbackInfo.BestScore3 = ULONG_MAX;
|
CallbackInfo.BestScore3 = ULONG_MAX;
|
||||||
|
@ -7629,7 +7634,7 @@ SetupDiInstallDriverFiles(
|
||||||
ret = SetupDiGetActualSectionToInstallW(
|
ret = SetupDiGetActualSectionToInstallW(
|
||||||
SelectedDriver->InfFileDetails->hInf,
|
SelectedDriver->InfFileDetails->hInf,
|
||||||
SelectedDriver->Details.SectionName,
|
SelectedDriver->Details.SectionName,
|
||||||
SectionName, MAX_PATH - strlenW(DotCoInstallers), &SectionNameLength, NULL);
|
SectionName, MAX_PATH, &SectionNameLength, NULL);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
@ -7946,7 +7951,6 @@ InfIsFromOEMLocation(
|
||||||
strcatW(Windir, BackSlash);
|
strcatW(Windir, BackSlash);
|
||||||
strcatW(Windir, InfDirectory);
|
strcatW(Windir, InfDirectory);
|
||||||
|
|
||||||
DPRINT1("Comparing %S and %S\n", FullName, Windir);
|
|
||||||
if (strncmpiW(FullName, Windir, last - FullName) == 0)
|
if (strncmpiW(FullName, Windir, last - FullName) == 0)
|
||||||
{
|
{
|
||||||
/* The path is %SYSTEMROOT%\Inf */
|
/* The path is %SYSTEMROOT%\Inf */
|
||||||
|
|
Loading…
Reference in a new issue