From dc9cd4b1ddd79914f15172a23676d7c77a180392 Mon Sep 17 00:00:00 2001 From: Glax Date: Thu, 31 Oct 2024 20:41:46 +0100 Subject: [PATCH] Append ".failed" to job-files that werent successfully added. --- Tranga/Jobs/JobBoss.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 8a3a109..c3eebfa 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -167,8 +167,8 @@ public class JobBoss : GlobalBase else { Log($"Adding Job {job}"); - if(!AddJob(job, file.Name)) //If we detect a duplicate, delete the file. - file.Delete(); + if(!AddJob(job, file.FullName)) //If we detect a duplicate, delete the file. + file.MoveTo(string.Concat(file.FullName, ".failed")); } }