From d884914c813f69c749537d067b18f8b7ea9510f3 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 3 Dec 2017 16:00:07 -0500 Subject: [PATCH] New: Include APFS disks in disk space --- src/NzbDrone.Mono/Disk/DiskProvider.cs | 4 ++-- src/NzbDrone.Mono/Disk/FindDriveType.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Mono/Disk/DiskProvider.cs b/src/NzbDrone.Mono/Disk/DiskProvider.cs index bc47532fb..a2f52139c 100644 --- a/src/NzbDrone.Mono/Disk/DiskProvider.cs +++ b/src/NzbDrone.Mono/Disk/DiskProvider.cs @@ -81,8 +81,8 @@ namespace NzbDrone.Mono.Disk .Concat(GetDriveInfoMounts() .Select(d => new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat))) .Where(d => d.DriveType == DriveType.Fixed || - d.DriveType == DriveType.Network || d.DriveType == - DriveType.Removable)) + d.DriveType == DriveType.Network || + d.DriveType == DriveType.Removable)) .DistinctBy(v => v.RootDirectory) .ToList(); } diff --git a/src/NzbDrone.Mono/Disk/FindDriveType.cs b/src/NzbDrone.Mono/Disk/FindDriveType.cs index 80f4ab252..4a14feaf0 100644 --- a/src/NzbDrone.Mono/Disk/FindDriveType.cs +++ b/src/NzbDrone.Mono/Disk/FindDriveType.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using NzbDrone.Common.Extensions; @@ -9,6 +9,7 @@ namespace NzbDrone.Mono.Disk private static readonly Dictionary DriveTypeMap = new Dictionary { { "afpfs", DriveType.Network }, + { "apfs", DriveType.Fixed }, { "zfs", DriveType.Fixed } };