mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 10:17:47 +00:00
Suppress warnings for free space check on fixed disks
This commit is contained in:
parent
ccff4fe142
commit
225489738d
1 changed files with 6 additions and 3 deletions
|
@ -58,10 +58,10 @@ namespace NzbDrone.Core.DiskSpace
|
|||
|
||||
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)
|
||||
{
|
||||
|
@ -87,9 +87,12 @@ namespace NzbDrone.Core.DiskSpace
|
|||
diskSpace.Label = _diskProvider.GetVolumeLabel(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (!suppressWarnings)
|
||||
{
|
||||
_logger.WarnException("Unable to get free space for: " + path, ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (diskSpace != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue