mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
wix: install dotnet 3 after installation if needed (#2775)
This commit is contained in:
@@ -209,7 +209,7 @@ namespace updating
|
||||
return { std::move(path_str) };
|
||||
}
|
||||
|
||||
std::future<void> attempt_to_download_installer(const std::filesystem::path& destination, const winrt::Windows::Foundation::Uri& url)
|
||||
std::future<void> try_download_file(const std::filesystem::path& destination, const winrt::Windows::Foundation::Uri& url)
|
||||
{
|
||||
namespace storage = winrt::Windows::Storage;
|
||||
|
||||
@@ -218,6 +218,7 @@ namespace updating
|
||||
(void)response.EnsureSuccessStatusCode();
|
||||
auto msi_installer_file_stream = co_await storage::Streams::FileRandomAccessStream::OpenAsync(destination.c_str(), storage::FileAccessMode::ReadWrite, storage::StorageOpenOptions::AllowReadersAndWriters, storage::Streams::FileOpenDisposition::CreateAlways);
|
||||
co_await response.Content().WriteToStreamAsync(msi_installer_file_stream);
|
||||
msi_installer_file_stream.Close();
|
||||
}
|
||||
|
||||
std::future<void> try_autoupdate(const bool download_updates_automatically)
|
||||
@@ -244,7 +245,7 @@ namespace updating
|
||||
{
|
||||
try
|
||||
{
|
||||
co_await attempt_to_download_installer(installer_download_dst, new_version->msi_download_url);
|
||||
co_await try_download_file(installer_download_dst, new_version->msi_download_url);
|
||||
download_success = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user