Fixed: Ignore inaccessible mount points

This commit is contained in:
Bogdan 2023-09-14 04:06:08 +03:00 committed by GitHub
parent 7593d4e370
commit 60f18249b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -190,10 +190,12 @@ namespace NzbDrone.Mono.Disk
} }
catch (Exception ex) catch (Exception ex)
{ {
throw new Exception($"Failed to fetch drive info for mount point: {d.Name}", ex); _logger.Debug(ex, "Failed to fetch drive info for mount point: {0}", d.Name);
return null;
} }
}) })
.Where(d => d.DriveType is DriveType.Fixed or DriveType.Network or DriveType.Removable)); .Where(d => d is { DriveType: DriveType.Fixed or DriveType.Network or DriveType.Removable }));
} }
catch (Exception e) catch (Exception e)
{ {