Skip to content

Commit

Permalink
Fixed: Log name of mount point failure
Browse files Browse the repository at this point in the history
(cherry picked from commit b5050d02d6adbaaaa0f8ae9f8426551e5606fff1)

Fixes #2503
  • Loading branch information
mynameisbogdan committed May 18, 2023
1 parent a0ea9d4 commit ccd8d93
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/NzbDrone.Mono/Disk/DiskProvider.cs
Expand Up @@ -201,10 +201,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)
{
Expand Down

0 comments on commit ccd8d93

Please sign in to comment.