Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Jan 12, 2025
1 parent 9b14771 commit b8d857a
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/UniGetUI.PackageEngine.Operations/DownloadOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,11 @@ protected override async Task<OperationVeredict> PerformOperation()
Uri? downloadUrl = _package.Details.InstallerUrl;
if (downloadUrl is null)
{
Line($"We couldn't find any installer for this package. " +
Line($"UniGetUI was not able to find any installer for this package. " +
$"Please check that this package has an applicable installer and try again later", LineType.StdERR);
return OperationVeredict.Failure;
}

/*FileSavePicker savePicker = new(hWnd);
string extension = _package.Manager is BaseNuGet
? "nupkg"
: downloadUrl.ToString().Split('.').Last();
string suggestedName = _package.Id + " installer." + extension;
List<string> extensions = new();
extensions.Add($"*.{extension}");
if (downloadUrl.ToString().Split('.')[^1] == "nupkg") extensions.Add("*.zip");
extensions.Add("*.*");
string name = await Task.Run(() => savePicker.Show(extensions, suggestedName));
if (name == String.Empty)
{
Line("User has canceled the operation");
return OperationVeredict.Canceled;
}*/

using var httpClient = new HttpClient();
using var response = await httpClient.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead);

Expand Down

0 comments on commit b8d857a

Please sign in to comment.