From bf49ee3a6d525f7fa988233b9c79ee42cb4d81f0 Mon Sep 17 00:00:00 2001
From: BubbaGumpShrump <joshua.p.farrell@gmail.com>
Date: Sun, 8 Dec 2024 16:23:26 -0500
Subject: [PATCH] CSV fix

---
 AutoTrackR2/KillTrackR_MainScript.ps1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/AutoTrackR2/KillTrackR_MainScript.ps1 b/AutoTrackR2/KillTrackR_MainScript.ps1
index 17f3728..936d90f 100644
--- a/AutoTrackR2/KillTrackR_MainScript.ps1
+++ b/AutoTrackR2/KillTrackR_MainScript.ps1
@@ -338,8 +338,8 @@ function Read-LogEntry {
 					# If file doesn't exist, create it with headers
 					$killData | Export-Csv -Path $csvPath -NoTypeInformation
 				} else {
-					# Append data to the existing file
-					$killData | Export-Csv -Path $csvPath -Append -NoTypeInformation
+					# Append data to the existing file without adding headers
+					$killData | ConvertTo-Csv -NoTypeInformation | Select-Object -Skip 1 | Out-File -Append -Encoding utf8 -FilePath $csvPath
 				}
 
 				$sleeptimer = 10