diff --git a/src/NzbDrone.Mono/Disk/DiskProvider.cs b/src/NzbDrone.Mono/Disk/DiskProvider.cs index df58608b8..f42cdbe81 100644 --- a/src/NzbDrone.Mono/Disk/DiskProvider.cs +++ b/src/NzbDrone.Mono/Disk/DiskProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -116,21 +116,14 @@ public override void SetPermissions(string path, string mask, string user, strin public override List GetMounts() { - var mounts = GetDriveInfoMounts().Select(d => new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat))) - .Where(d => d.DriveType == DriveType.Fixed || d.DriveType == DriveType.Network || d.DriveType == DriveType.Removable); - - - - var procMounts = _procMountProvider.GetMounts(); - - if (procMounts != null) - { - return mounts.Concat(procMounts).DistinctBy(v => v.RootDirectory) - .ToList(); - } - - return mounts.Cast().DistinctBy(v => v.RootDirectory) - .ToList(); + return _procMountProvider.GetMounts() + .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)) + .DistinctBy(v => v.RootDirectory) + .ToList(); } public override long? GetTotalSize(string path) 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 @@ public static class FindDriveType private static readonly Dictionary DriveTypeMap = new Dictionary { { "afpfs", DriveType.Network }, + { "apfs", DriveType.Fixed }, { "zfs", DriveType.Fixed } };