diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 3be3204..d3d5583 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -151,9 +151,10 @@ public class JobBoss : GlobalBase public void ExportJobsList() { Log($"Exporting {settings.jobsFilePath}"); + string content = JsonConvert.SerializeObject(this.jobs); while(IsFileInUse(settings.jobsFilePath)) Thread.Sleep(10); - File.WriteAllText(settings.jobsFilePath, JsonConvert.SerializeObject(this.jobs)); + File.WriteAllText(settings.jobsFilePath, content); } public void CheckJobs()