aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2021-11-07 19:36:09 +0100
committerGitHub <noreply@github.com>2021-11-07 19:36:09 +0100
commit195831ad4a538e0a44714dfdc31bd007ab5c3e66 (patch)
tree8ad8d89f64ec3c7fef664bda78dddd1f725d0b99
parent83859a1e6d96cbb60a3b43f7537c0ab0fbdff510 (diff)
parent0f528966919518a190c33291946ba5947cc29670 (diff)
Merge pull request #6792 from Bond-009/authex
Fix UnauthorizedAccessException in GetDrives
-rw-r--r--Emby.Server.Implementations/IO/ManagedFileSystem.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
index eeee28842..3aefb841e 100644
--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
@@ -580,7 +580,11 @@ namespace Emby.Server.Implementations.IO
{
// check for ready state to avoid waiting for drives to timeout
// some drives on linux have no actual size or are used for other purposes
- return DriveInfo.GetDrives().Where(d => d.IsReady && d.TotalSize != 0 && d.DriveType != DriveType.Ram)
+ return DriveInfo.GetDrives()
+ .Where(
+ d => (d.DriveType == DriveType.Fixed || d.DriveType == DriveType.Network || d.DriveType == DriveType.Removable)
+ && d.IsReady
+ && d.TotalSize != 0)
.Select(d => new FileSystemMetadata
{
Name = d.Name,