Case insensitive TDF comparison (#209)

This commit is contained in:
jyvenugo 2019-08-19 14:21:43 -07:00 коммит произвёл GitHub
Родитель 78c399534a
Коммит 8d6be80310
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -7,6 +7,8 @@ static const std::wstring registryDatFile = L"\\registry.dat";
static const std::wstring blockMapFile = L"\\AppxBlockMap.xml";
static const std::wstring manifestFile = L"\\AppxManifest.xml";
static const std::wstring classesKeyPath = L"SOFTWARE\\Classes";
static const std::wstring desktopTargetDeviceFamilyName = L"MSIXCore.Desktop";
static const std::wstring serverTargetDeviceFamilyName = L"MSIXCore.Server";
static const std::wstring msixCoreProgIDPrefix = L"MsixCore";
static const std::wstring openWithProgIdsKeyName = L"OpenWithProgids";

Просмотреть файл

@ -9,6 +9,8 @@
#include <TraceLoggingProvider.h>
#include "MsixTraceLoggingProvider.hpp"
#include <VersionHelpers.h>
#include "Constants.hpp"
using namespace MsixCoreLib;
const PCWSTR ValidateTargetDeviceFamily::HandlerName = L"ValidateTargetDeviceFamily";
@ -105,14 +107,14 @@ bool ValidateTargetDeviceFamily::IsTargetDeviceFamilyNameCompatibleWithOS()
{
if (IsWindowsProductTypeServer()) /// Server OS
{
if (m_targetDeviceFamilyName == L"MsixCore.Server" || m_targetDeviceFamilyName == L"MsixCore.Desktop")
if(CaseInsensitiveEquals(m_targetDeviceFamilyName, serverTargetDeviceFamilyName) || CaseInsensitiveEquals(m_targetDeviceFamilyName, desktopTargetDeviceFamilyName))
{
return true;
}
}
else if (IsWindowsProductTypeDesktop()) /// Desktop OS
{
if (m_targetDeviceFamilyName == L"MsixCore.Desktop")
if (CaseInsensitiveEquals(m_targetDeviceFamilyName, desktopTargetDeviceFamilyName))
{
return true;
}