more CA fix

pull/456/head
Antoine Rybacki 2 years ago
parent 58182284b2
commit 5b4917eb29

@ -1163,7 +1163,7 @@ namespace DepotDownloader
neededChunks = Util.ValidateSteam3FileChecksums(fs, file.Chunks.OrderBy(x => x.Offset).ToArray());
}
if (neededChunks.Count() == 0)
if (neededChunks.Count == 0)
{
lock (depotDownloadCounter)
{

@ -211,9 +211,9 @@ namespace DepotDownloader
};
var request = new SteamApps.PICSRequest(appId);
if (AppTokens.ContainsKey(appId))
if (AppTokens.TryGetValue(appId, out var value))
{
request.AccessToken = AppTokens[appId];
request.AccessToken = value;
}
WaitUntilCallback(() =>
@ -656,7 +656,7 @@ namespace DepotDownloader
{
Console.Write("Please enter your 2 factor auth code from your authenticator app: ");
logonDetails.TwoFactorCode = Console.ReadLine();
} while (String.Empty == logonDetails.TwoFactorCode);
} while (string.Empty == logonDetails.TwoFactorCode);
}
else if (isAccessToken)
{

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -115,12 +115,9 @@ namespace DepotDownloader
public static byte[] SHAHash(byte[] input)
{
using (var sha = SHA1.Create())
{
var output = sha.ComputeHash(input);
var output = SHA1.HashData(input);
return output;
}
return output;
}
public static byte[] DecodeHexString(string hex)
@ -146,7 +143,7 @@ namespace DepotDownloader
public static async Task InvokeAsync(IEnumerable<Func<Task>> taskFactories, int maxDegreeOfParallelism)
{
if (taskFactories == null) throw new ArgumentNullException(nameof(taskFactories));
ArgumentNullException.ThrowIfNull(taskFactories);
if (maxDegreeOfParallelism <= 0) throw new ArgumentException(nameof(maxDegreeOfParallelism));
var queue = taskFactories.ToArray();

Loading…
Cancel
Save