1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Added more logging when free disk space check fails on import

This commit is contained in:
Mark McDowall 2013-08-19 08:19:39 -07:00
parent 551e6e2e5b
commit bd4bd47e4e

View File

@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using System.Linq;
using NLog;
using NzbDrone.Common;
@ -21,6 +22,8 @@ public FreeSpaceSpecification(IDiskProvider diskProvider, Logger logger)
public string RejectionReason { get { return "Not enough free space"; } }
public bool IsSatisfiedBy(LocalEpisode localEpisode)
{
try
{
var path = Directory.GetParent(localEpisode.Series.Path);
var freeSpace = _diskProvider.GetAvilableSpace(path.FullName);
@ -33,5 +36,11 @@ public bool IsSatisfiedBy(LocalEpisode localEpisode)
return true;
}
catch (Exception ex)
{
_logger.ErrorException("Unable to check free disk space while importing: " + localEpisode.Path, ex);
throw;
}
}
}
}