add VFS file paths and fix caseinsensitiveissubstring (#229)

This commit is contained in:
wcheng-msft 2019-10-09 17:16:21 -07:00 коммит произвёл GitHub
Родитель 17a344a3f6
Коммит 8f32777cad
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 1 удалений

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

@ -83,6 +83,7 @@ HRESULT FilePathMappings::InitializePaths()
TextOle<WCHAR> windowsPath;
TextOle<WCHAR> commonAppDataPath;
TextOle<WCHAR> localAppDataPath;
TextOle<WCHAR> localAppDataLowPath;
TextOle<WCHAR> appDataPath;
TextOle<WCHAR> commonProgramsPath;
@ -94,6 +95,8 @@ HRESULT FilePathMappings::InitializePaths()
RETURN_IF_FAILED(SHGetKnownFolderPath(FOLDERID_ProgramData, 0, NULL, &commonAppDataPath));
RETURN_IF_FAILED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appDataPath));
RETURN_IF_FAILED(SHGetKnownFolderPath(FOLDERID_CommonPrograms, 0, NULL, &commonProgramsPath));
RETURN_IF_FAILED(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &localAppDataPath));
RETURN_IF_FAILED(SHGetKnownFolderPath(FOLDERID_LocalAppDataLow, 0, NULL, &localAppDataLowPath));
std::wstring appVSystem32CatrootPath = std::wstring(systemPath.Get());
std::wstring appVSystem32Catroot2Path = std::wstring(systemPath.Get());
@ -126,6 +129,8 @@ HRESULT FilePathMappings::InitializePaths()
m_map[L"AppVSystems32Driverstore"] = appVSystem32DriverstorePath;
m_map[L"AppVSystems32Logfiles"] = appVSystem32LogfilesPath;
m_map[L"AppVSystems32Spool"] = appVSystem32SpoolPath;
m_map[L"Local AppData"] = std::wstring(localAppDataPath.Get());
m_map[L"LocalAppDataLow"] = std::wstring(localAppDataLowPath.Get());
#ifdef _WIN64
TextOle<WCHAR> programFilesX64Path;

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

@ -60,7 +60,7 @@ namespace MsixCoreLib
substring.begin(), substring.end(),
[](wchar_t ch1, wchar_t ch2) { return std::toupper(ch1, std::locale()) == std::toupper(ch2, std::locale()); }
);
return (it != substring.end());
return (it != string.end());
}
HRESULT GetAttributeValueFromElement(IMsixElement * element, const std::wstring attributeName, std::wstring & attributeValue)