Fixed: Include afpfs mount points in free space checks

Fixes #1399
This commit is contained in:
Mark McDowall
2016-07-26 22:40:54 -07:00
parent c3f9a0336c
commit e4adc1d3a1
7 changed files with 54 additions and 31 deletions
+5 -6
View File
@@ -9,7 +9,6 @@ using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Instrumentation.Extensions;
namespace NzbDrone.Common.Disk
{
@@ -390,7 +389,10 @@ namespace NzbDrone.Common.Disk
public virtual List<IMount> GetMounts()
{
return GetDriveInfoMounts();
return GetDriveInfoMounts().Where(d => d.DriveType == DriveType.Fixed || d.DriveType == DriveType.Network || d.DriveType == DriveType.Removable)
.Select(d => new DriveInfoMount(d))
.Cast<IMount>()
.ToList();
}
public virtual IMount GetMount(string path)
@@ -411,13 +413,10 @@ namespace NzbDrone.Common.Disk
}
}
protected List<IMount> GetDriveInfoMounts()
protected List<DriveInfo> GetDriveInfoMounts()
{
return DriveInfo.GetDrives()
.Where(d => d.DriveType == DriveType.Fixed || d.DriveType == DriveType.Network || d.DriveType == DriveType.Removable)
.Where(d => d.IsReady)
.Select(d => new DriveInfoMount(d))
.Cast<IMount>()
.ToList();
}