2
0

Fix FileInUse

This commit is contained in:
glax 2023-09-02 23:14:16 +02:00
parent 0c8145803e
commit 0f17615b10

View File

@ -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()