v4.7.1.2
- Fixes & string clarifications related to anti-virus false positives
This commit is contained in:
parent
2cf940ef25
commit
c74d597a7a
3 changed files with 8 additions and 12 deletions
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<UseWindowsForms>True</UseWindowsForms>
|
||||
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
|
||||
<Version>4.7.1.1</Version>
|
||||
<Version>4.7.1.2</Version>
|
||||
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
|
||||
<Company>CreamInstaller</Company>
|
||||
<Product>Automatic DLC Unlocker Installer & Configuration Generator</Product>
|
||||
|
|
|
@ -58,8 +58,9 @@ internal static class Program
|
|||
{
|
||||
using DialogForm dialogForm = new(form);
|
||||
if (dialogForm.Show(SystemIcons.Error,
|
||||
$"ERROR: {selection.Name} is currently running!" + "\n\nPlease close the program/game to continue . . . ", "Retry", "Cancel")
|
||||
== DialogResult.OK)
|
||||
$"ERROR: One or more DLLs crucial to unlocker installation are locked for {selection.Name}!"
|
||||
+ "\n\nThis is commonly caused by the program/game being active or an anti-virus blocking access."
|
||||
+ "\n\nPlease close the program/game or resolve your anti-virus to continue . . . ", "Retry", "Cancel") == DialogResult.OK)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -595,17 +595,12 @@ internal static class Resources
|
|||
config = directory + @"\cream_api.ini";
|
||||
}
|
||||
|
||||
private static string ComputeMD5(this string filePath)
|
||||
{
|
||||
if (!filePath.FileExists())
|
||||
return null;
|
||||
#pragma warning disable CA5351
|
||||
using MD5 md5 = MD5.Create();
|
||||
private static string ComputeMD5(this string filePath)
|
||||
=> filePath.FileExists() && filePath.ReadFileBytes() is { } bytes
|
||||
? BitConverter.ToString(MD5.HashData(bytes)).Replace("-", "").ToUpperInvariant()
|
||||
: null;
|
||||
#pragma warning restore CA5351
|
||||
using FileStream stream = File.OpenRead(filePath);
|
||||
byte[] hash = md5.ComputeHash(stream);
|
||||
return BitConverter.ToString(hash).Replace("-", "").ToUpperInvariant();
|
||||
}
|
||||
|
||||
internal static bool IsResourceFile(this string filePath, ResourceIdentifier identifier)
|
||||
=> filePath.ComputeMD5() is { } hash && ResourceMD5s[identifier].Contains(hash);
|
||||
|
|
Loading…
Reference in a new issue