Merge pull request #6792 from Bond-009/authex

Fix UnauthorizedAccessException in GetDrives
pull/6793/head
Claus Vium 3 years ago committed by GitHub
commit 195831ad4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,

Loading…
Cancel
Save