Skip to content

Commit

Permalink
Fix issue where the changelog could not be retrieved.
Browse files Browse the repository at this point in the history
  • Loading branch information
Si13n7 committed Apr 30, 2021
1 parent 689561f commit 3a057f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AppsLauncherUpdater/Libraries/UserAgents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

internal static class UserAgents
{
internal static string Default { get; } = "Wget/1.16 (linux-gnu)";
internal static string Default { get; } = $"Wget/1.{DateTime.Now:yy.M}";

internal static string Internal { get; } = $"Wget/{EnvironmentEx.Version} (Windows NT/{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}; {(Environment.Is64BitOperatingSystem ? "Win64; x64" : "Win32; x86")}) {AssemblyInfo.Product}/{AssemblyInfo.Version}";
}
Expand Down
4 changes: 1 addition & 3 deletions src/AppsLauncherUpdater/Windows/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ private void SetChangeLog(params string[] mirrors)
var path = PathEx.AltCombine(mirror, "ChangeLog.txt");
if (string.IsNullOrWhiteSpace(path))
continue;
if (!NetEx.FileIsAvailable(path, 60000, UserAgents.Internal))
continue;
changes = WebTransfer.DownloadString(path, 60000, UserAgents.Internal);
changes = WebTransfer.DownloadString(path, 20000, UserAgents.Internal);
if (!string.IsNullOrWhiteSpace(changes))
break;
}
Expand Down

0 comments on commit 3a057f7

Please sign in to comment.