2
0
Эх сурвалжийг харах

Merge pull request #6792 from Bond-009/authex

Fix UnauthorizedAccessException in GetDrives
Claus Vium 3 жил өмнө
parent
commit
195831ad4a

+ 5 - 1
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,