0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:50:44 -05:00

Fix for ValidationUtil

This commit is contained in:
Terkoiz 2023-12-27 23:58:33 +02:00
parent 1c7888b446
commit 850fc2b6a2

View File

@ -1,5 +1,4 @@
using Aki.Common.Utils; using Aki.Common.Utils;
using BepInEx.Logging;
using Microsoft.Win32; using Microsoft.Win32;
using System.IO; using System.IO;
@ -28,9 +27,9 @@ namespace Aki.Core.Utils
new FileInfo(Path.Combine(v2, "UnityCrashHandler64.exe")) new FileInfo(Path.Combine(v2, "UnityCrashHandler64.exe"))
}; };
ServerLog.Debug("Aki.Core", new FileInfo(Path.Combine(v2, "UnityCrashHandler64.exe")).Length.ToString()); ServerLog.Debug("Aki.Core", Gfs(v2, "UnityCrashHandler64.exe")?.Length.ToString() ?? "0");
ServerLog.Debug("Aki.Core", new FileInfo(Path.Combine(v2, "Uninstall.exe")).Length.ToString()); ServerLog.Debug("Aki.Core", Gfs(v2, "Uninstall.exe")?.Length.ToString() ?? "0");
ServerLog.Debug("Aki.Core", new FileInfo(Path.Combine(v2, "Register.bat")).Length.ToString()); ServerLog.Debug("Aki.Core", Gfs(v2, "Register.bat")?.Length.ToString() ?? "0");
v0 = v4.Length - 1; v0 = v4.Length - 1;
@ -49,5 +48,11 @@ namespace Aki.Core.Utils
return v0 == 0; return v0 == 0;
} }
private static FileInfo Gfs(string p, string f)
{
var a = Path.Combine(p, f);
return File.Exists(a) ? new FileInfo(a) : null;
}
} }
} }