diff --git a/SPTInstaller/Helpers/DownloadCacheHelper.cs b/SPTInstaller/Helpers/DownloadCacheHelper.cs
index 29e343e..d1af78f 100644
--- a/SPTInstaller/Helpers/DownloadCacheHelper.cs
+++ b/SPTInstaller/Helpers/DownloadCacheHelper.cs
@@ -14,7 +14,11 @@ public static class DownloadCacheHelper
public static string GetCacheSizeText()
{
if (!Directory.Exists(CachePath))
- return "No cache folder";
+ {
+ var message = "No cache folder";
+ Log.Information(message);
+ return message;
+ }
var cacheDir = new DirectoryInfo(CachePath);
@@ -22,7 +26,9 @@ public static class DownloadCacheHelper
if (cacheSize == -1)
{
- return "An error occurred while getting the cache size :(";
+ var message = "An error occurred while getting the cache size :(";
+ Log.Error(message);
+ return message;
}
if (cacheSize == 0)
@@ -51,7 +57,11 @@ public static class DownloadCacheHelper
Directory.CreateDirectory(CachePath);
if (!cacheFile.Exists || expectedHash == null)
+ {
+ Log.Information($"{cacheFile.Name} {(cacheFile.Exists ? "is in cache" : "NOT in cache")}");
+ Log.Information($"Expected hash: {(expectedHash == null ? "not provided" : expectedHash)}");
return false;
+ }
if (FileHashHelper.CheckHash(cacheFile, expectedHash))
{
diff --git a/SPTInstaller/Helpers/FileHashHelper.cs b/SPTInstaller/Helpers/FileHashHelper.cs
index 315fbe3..0449069 100644
--- a/SPTInstaller/Helpers/FileHashHelper.cs
+++ b/SPTInstaller/Helpers/FileHashHelper.cs
@@ -2,6 +2,7 @@
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using Gitea.Model;
+using Serilog;
namespace SPTInstaller.Helpers;
@@ -26,6 +27,8 @@ public static class FileHashHelper
var sourceHash = md5Service.ComputeHash(sourceStream);
var expectedHashBytes = Convert.FromBase64String(expectedHash);
+
+ Log.Information($"Comparing Hashes :: S: {Convert.ToBase64String(sourceHash)} - E: {expectedHash}");
var matched = Enumerable.SequenceEqual(sourceHash, expectedHashBytes);
diff --git a/SPTInstaller/SPTInstaller.csproj b/SPTInstaller/SPTInstaller.csproj
index 4e6fe0c..d344dc9 100644
--- a/SPTInstaller/SPTInstaller.csproj
+++ b/SPTInstaller/SPTInstaller.csproj
@@ -9,8 +9,8 @@
icon.ico
Assets\icon.ico
Debug;Release;TEST
- 2.27
- 2.27
+ 2.28
+ 2.28
SPT-AKI