Revert "Small changes"

This reverts commit 6d40d3b891.
This commit is contained in:
tidusjar 2016-05-31 16:47:10 +01:00
commit c57f33151b
9 changed files with 38 additions and 453 deletions

View file

@ -26,7 +26,6 @@
#endregion
using System;
using System.IO;
using System.Linq;
using NLog;
@ -131,18 +130,7 @@ namespace PlexRequests.Services.Jobs
private bool DoWeNeedToBackup(string backupPath)
{
var files = Directory.GetFiles(backupPath);
var last = files.LastOrDefault();
if (!string.IsNullOrEmpty(last))
{
var dt = ParseName(Path.GetFileName(last));
if (dt < DateTime.Now.AddHours(-1))
{
return true;
}
return false;
}
// We don't have a backup
//TODO Get the latest file and if it's within an hour of DateTime.Now then don't bother backing up.
return true;
}