Use remote file name for downloaded sdk

This commit is contained in:
Jackson Schuster 2024-03-06 11:59:14 -08:00
parent 2c5bee4788
commit b290188e39

View file

@ -82,7 +82,7 @@ public abstract class GetClosestArchive : Microsoft.Build.Utilities.Task, ICance
var packageUriPath = packageResponse.RequestMessage!.RequestUri!.LocalPath;
ClosestOfficialArchivePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + $".{ArchiveName}-{BuiltVersion}-{BuiltRid}.closest.{ArchiveExtension}");
ClosestOfficialArchivePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + "." + Path.GetFileName(packageUriPath));
Log.LogMessage($"Copying {packageUriPath} to {ClosestOfficialArchivePath}");
using (var file = File.Create(ClosestOfficialArchivePath))
{