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> <TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AssemblyVersion>1.4.1</AssemblyVersion> <AssemblyVersion>1.4.2</AssemblyVersion>
<FileVersion>1.4.1</FileVersion> <FileVersion>1.4.2</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,6 @@
// See https://aka.ms/new-console-template for more information // See https://aka.ms/new-console-template for more information
using System.Reflection;
using EftPatchHelper.Helpers; using EftPatchHelper.Helpers;
using EftPatchHelper.Interfaces; using EftPatchHelper.Interfaces;
using EftPatchHelper.Model; using EftPatchHelper.Model;
@ -26,6 +28,8 @@ namespace EftPatchHelper
Console.OutputEncoding = System.Text.Encoding.UTF8; Console.OutputEncoding = System.Text.Encoding.UTF8;
AnsiConsole.Write(new FigletText("EFT Patch Helper").Centered().Color(Color.Blue)); 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); var host = ConfigureHost(args);
host.Services.GetRequiredService<Program>().Run(); host.Services.GetRequiredService<Program>().Run();

View File

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