mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Ensure that the cached version of MCC is refreshed every update (#2760)
fixes #2758 this happened because we added sentry in a future release, but the cache was using an old executable, so it couldn't find the assembly.
This commit is contained in:
parent
c50b360eae
commit
ca966a464c
1 changed files with 9 additions and 1 deletions
|
|
@ -93,10 +93,18 @@ namespace MinecraftClient.Scripting.DynamicRun.Builder
|
|||
foreach (var file in Directory.EnumerateFiles(tempPath))
|
||||
{
|
||||
if (file.EndsWith("mcc-executable"))
|
||||
{
|
||||
// Check if the file is the same as the current executable.
|
||||
if (File.ReadAllBytes(file).SequenceEqual(File.ReadAllBytes(executablePath)))
|
||||
{
|
||||
useExisting = true;
|
||||
break;
|
||||
}
|
||||
|
||||
// If not, refresh the cache.
|
||||
File.Delete(file);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!File.Exists(executablePath))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue