Skip to content

Commit

Permalink
Only create ips if any pchtxt files exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jul 9, 2024
1 parent 8bea0fe commit b71d849
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Tkmm.Core/Components/Mergers/ExefsMerger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ private enum State

public Task Merge(IModItem[] mods, string output)
{
IEnumerable<string> pchtxtFiles = mods
string[] pchtxtFiles = mods
.Select(x => Path.Combine(x.SourceFolder, TotkConfig.EXEFS))
.Where(Directory.Exists)
.SelectMany(Directory.EnumerateFiles)
.Where(x => Path.GetExtension(x.AsSpan()) is ".pchtxt");
.Where(x => Path.GetExtension(x.AsSpan()) is ".pchtxt")
.ToArray();

if (pchtxtFiles.Length <= 0) {
return Task.CompletedTask;
}

State state = State.None;
string expectedPchtxtHeader = $"@nsobid-{Totk.Config.NSOBID}";
Expand Down

0 comments on commit b71d849

Please sign in to comment.