add check for patched target

not perfect, but it should find if a patcher exe exists in the patch target so the folder can be added for removal
This commit is contained in:
IsWaffle 2023-10-30 18:42:14 -04:00
parent 6ba231287b
commit eb37ba65ba
3 changed files with 7 additions and 3 deletions

View File

@ -5,8 +5,8 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>1.4.1</AssemblyVersion>
<FileVersion>1.4.1</FileVersion>
<AssemblyVersion>1.4.2</AssemblyVersion>
<FileVersion>1.4.2</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -1,4 +1,6 @@
// See https://aka.ms/new-console-template for more information
using System.Reflection;
using EftPatchHelper.Helpers;
using EftPatchHelper.Interfaces;
using EftPatchHelper.Model;
@ -26,6 +28,8 @@ namespace EftPatchHelper
Console.OutputEncoding = System.Text.Encoding.UTF8;
AnsiConsole.Write(new FigletText("EFT Patch Helper").Centered().Color(Color.Blue));
var version = Assembly.GetExecutingAssembly().GetName().Version;
AnsiConsole.Write(new Rule($"[purple]v{version}[/]").Centered().RuleStyle("blue"));
var host = ConfigureHost(args);
host.Services.GetRequiredService<Program>().Run();

View File

@ -23,7 +23,7 @@ namespace EftPatchHelper.Tasks
foreach (var prepFolder in prepFolders)
{
if (prepFolder == _options.TargetClient.PrepPath)
if (prepFolder == _options.TargetClient.PrepPath && !File.Exists(Path.Join(prepFolder, "Patcher.exe")))
continue;
_fileToRemove.Add(new DirectoryInfo(prepFolder));