mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-25 06:58:40 +02:00
Merge pull request #6792 from Bond-009/authex
Fix UnauthorizedAccessException in GetDrives
This commit is contained in:
commit
195831ad4a
|
@ -580,7 +580,11 @@ namespace Emby.Server.Implementations.IO
|
||||||
{
|
{
|
||||||
// check for ready state to avoid waiting for drives to timeout
|
// 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
|
// 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
|
.Select(d => new FileSystemMetadata
|
||||||
{
|
{
|
||||||
Name = d.Name,
|
Name = d.Name,
|
||||||
|
|
Loading…
Reference in a new issue