Small changes and fixes

This commit is contained in:
Natsumi
2023-08-07 19:48:12 +12:00
parent eb0503ad85
commit 9e082145c5
10 changed files with 217 additions and 79 deletions

View File

@@ -179,8 +179,8 @@ namespace VRCX
using (var stream = File.OpenRead(DownloadTempLocation))
{
var hashBytes = sha256.ComputeHash(stream);
var hashString = BitConverter.ToString(hashBytes).Replace("-", "").ToLowerInvariant();
if (hashString != hash[0])
var hashString = BitConverter.ToString(hashBytes).Replace("-", "");
if (!hashString.Equals(hash[0], StringComparison.OrdinalIgnoreCase))
{
logger.Error($"Updater: Hash check failed file:{hashString} remote:{hash[0]}");
// can't delete file yet because it's in use