re-factored some file system access

This commit is contained in:
Luke Pulverenti
2013-06-03 22:02:49 -04:00
parent 08d9004d8f
commit 02fedead11
24 changed files with 339 additions and 258 deletions

View File

@@ -168,6 +168,14 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
if (!success)
{
previouslyFailedImages.Add(key);
var parentPath = Path.GetDirectoryName(failHistoryPath);
if (!Directory.Exists(parentPath))
{
Directory.CreateDirectory(parentPath);
}
_jsonSerializer.SerializeToFile(previouslyFailedImages, failHistoryPath);
}