diff --git a/DepotDownloader/AnsiDetector.cs b/DepotDownloader/AnsiDetector.cs index 5f157da3..f7f8a420 100644 --- a/DepotDownloader/AnsiDetector.cs +++ b/DepotDownloader/AnsiDetector.cs @@ -7,7 +7,6 @@ using System; using System.Linq; using System.Runtime.InteropServices; using System.Text.RegularExpressions; -using Microsoft.Win32.SafeHandles; using Windows.Win32; using Windows.Win32.System.Console; diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 462ef33d..f4de1f61 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -363,7 +363,7 @@ namespace DepotDownloader } else { - await DownloadAppAsync(appId, new List<(uint, ulong)> { (appId, ugcId) }, DEFAULT_BRANCH, null, null, null, false, true); + await DownloadAppAsync(appId, [(appId, ugcId)], DEFAULT_BRANCH, null, null, null, false, true); } } @@ -1400,7 +1400,7 @@ namespace DepotDownloader foreach (var file in manifest.Files) { - var sha1Hash = BitConverter.ToString(file.FileHash).Replace("-", ""); + var sha1Hash = Convert.ToHexString(file.FileHash); sw.WriteLine($"{file.TotalSize,14} {file.Chunks.Count,6} {sha1Hash} {file.Flags,5:D} {file.FileName}"); } } diff --git a/DepotDownloader/PlatformUtilities.cs b/DepotDownloader/PlatformUtilities.cs index a4f8fd77..819ec411 100644 --- a/DepotDownloader/PlatformUtilities.cs +++ b/DepotDownloader/PlatformUtilities.cs @@ -1,7 +1,6 @@ // This file is subject to the terms and conditions defined // in file 'LICENSE', which is part of this source code package. -using System; using System.IO; using System.Runtime.InteropServices; using System.Runtime.Versioning; diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 5d757df7..64feafed 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -89,7 +89,7 @@ namespace DepotDownloader public delegate bool WaitCondition(); - private readonly object steamLock = new(); + private readonly Lock steamLock = new(); public bool WaitUntilCallback(Action submitter, WaitCondition waiter) {