From 32ab9a552ffcc0e2342e31b6f53e40196ffe7612 Mon Sep 17 00:00:00 2001 From: Glax Date: Wed, 18 Sep 2024 18:56:01 +0200 Subject: [PATCH] Also delete files on UpdateJobFile if we dont provide a filepath --- Tranga/Jobs/JobBoss.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 2e35168..bd33c62 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -189,7 +189,7 @@ public class JobBoss : GlobalBase internal void UpdateJobFile(Job job, string? oldFile = null) { string newJobFilePath = Path.Join(TrangaSettings.jobsFolderPath, $"{job.id}.json"); - string oldFilePath = Path.Join(TrangaSettings.jobsFolderPath, oldFile); + string oldFilePath = Path.Join(TrangaSettings.jobsFolderPath, oldFile??$"{job.id}.json"); //Delete old file if (File.Exists(oldFilePath))