1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-10 23:29:53 +02:00

Fixed: Log name of mount point failure

This commit is contained in:
Bogdan 2023-05-18 03:12:06 +03:00 committed by GitHub
parent 3ece1533d8
commit b5050d02d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,10 +182,18 @@ protected override List<IMount> GetAllMounts()
try
{
mounts.AddRange(GetDriveInfoMounts()
.Select(d => new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat)))
.Where(d => d.DriveType == DriveType.Fixed ||
d.DriveType == DriveType.Network ||
d.DriveType == DriveType.Removable));
.Select(d =>
{
try
{
return new DriveInfoMount(d, FindDriveType.Find(d.DriveFormat));
}
catch (Exception ex)
{
throw new Exception($"Failed to fetch drive info for mount point: {d.Name}", ex);
}
})
.Where(d => d.DriveType is DriveType.Fixed or DriveType.Network or DriveType.Removable));
}
catch (Exception e)
{