|
|
@ -58,10 +58,10 @@ namespace NzbDrone.Core.DiskSpace
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<DiskSpace> GetFixedDisksFreeSpace()
|
|
|
|
private IEnumerable<DiskSpace> GetFixedDisksFreeSpace()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return GetDiskSpace(_diskProvider.GetFixedDrives());
|
|
|
|
return GetDiskSpace(_diskProvider.GetFixedDrives(), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private IEnumerable<DiskSpace> GetDiskSpace(IEnumerable<String> paths)
|
|
|
|
private IEnumerable<DiskSpace> GetDiskSpace(IEnumerable<String> paths, bool suppressWarnings = false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var path in paths)
|
|
|
|
foreach (var path in paths)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -87,9 +87,12 @@ namespace NzbDrone.Core.DiskSpace
|
|
|
|
diskSpace.Label = _diskProvider.GetVolumeLabel(path);
|
|
|
|
diskSpace.Label = _diskProvider.GetVolumeLabel(path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!suppressWarnings)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.WarnException("Unable to get free space for: " + path, ex);
|
|
|
|
_logger.WarnException("Unable to get free space for: " + path, ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (diskSpace != null)
|
|
|
|
if (diskSpace != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|