From 3d40c5ba36c5e98954c2bc6073b4cf35cd42711a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Oct 2013 14:24:27 -0400 Subject: fixed xml providers running over and over --- .../ScheduledTasks/ScheduledTaskWorker.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs') diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index 8947bdcc0..fbdbf15ff 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -431,7 +431,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks { var path = Path.Combine(ApplicationPaths.ConfigurationDirectoryPath, "ScheduledTasks"); - if (create && !Directory.Exists(path)) + if (create) { Directory.CreateDirectory(path); } @@ -448,7 +448,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks { var path = Path.Combine(ApplicationPaths.DataPath, "ScheduledTasks"); - if (create && !Directory.Exists(path)) + if (create) { Directory.CreateDirectory(path); } @@ -507,10 +507,7 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks var parentPath = Path.GetDirectoryName(path); - if (!Directory.Exists(parentPath)) - { - Directory.CreateDirectory(parentPath); - } + Directory.CreateDirectory(parentPath); JsonSerializer.SerializeToFile(triggers.Select(ScheduledTaskHelpers.GetTriggerInfo), path); } -- cgit v1.2.3