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
+13 -6
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.IO;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.Disk
@@ -9,10 +6,12 @@ namespace NzbDrone.Common.Disk
public class DriveInfoMount : IMount
{
private readonly DriveInfo _driveInfo;
private readonly DriveType _driveType;
public DriveInfoMount(DriveInfo driveInfo)
public DriveInfoMount(DriveInfo driveInfo, DriveType driveType = DriveType.Unknown)
{
_driveInfo = driveInfo;
_driveType = driveType;
}
public long AvailableFreeSpace
@@ -27,7 +26,15 @@ namespace NzbDrone.Common.Disk
public DriveType DriveType
{
get { return _driveInfo.DriveType; }
get
{
if (_driveType != DriveType.Unknown)
{
return _driveType;
}
return _driveInfo.DriveType;
}
}
public bool IsReady