[Updating] Add versioning to UpdateState.json (#12744)

- fix "Check for updates" hang if UpdateState.json was deleted while the page is open
This commit is contained in:
Andrey Nekrasov
2021-08-12 14:53:51 +03:00
committed by GitHub
parent 0b509a2d0b
commit 05f12dcdf1
8 changed files with 141 additions and 73 deletions

View File

@@ -36,14 +36,7 @@ namespace updating
std::optional<VersionHelper> extract_version_from_release_object(const json::JsonObject& release_object)
{
try
{
return VersionHelper{ winrt::to_string(release_object.GetNamedString(L"tag_name")) };
}
catch (...)
{
}
return std::nullopt;
return VersionHelper::fromString(release_object.GetNamedString(L"tag_name"));
}
std::pair<Uri, std::wstring> extract_installer_asset_download_info(const json::JsonObject& release_object)