1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-17 15:02:34 +02:00

Suppress warnings for free space check on fixed disks

This commit is contained in:
Mark McDowall 2015-06-02 22:59:30 -07:00
parent ccff4fe142
commit 225489738d

View File

@ -58,10 +58,10 @@ private IEnumerable<DiskSpace> GetDroneFactoryFreeSpace()
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)
{ {
@ -88,7 +88,10 @@ private IEnumerable<DiskSpace> GetDiskSpace(IEnumerable<String> paths)
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.WarnException("Unable to get free space for: " + path, ex); if (!suppressWarnings)
{
_logger.WarnException("Unable to get free space for: " + path, ex);
}
} }
if (diskSpace != null) if (diskSpace != null)