mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-17 10:45:49 +02:00
Fixed: Getting free space for inaccessible drive won't log an error
This commit is contained in:
parent
485fa6a13d
commit
a433aac034
@ -24,7 +24,7 @@ public class DiskProvider : DiskProviderBase
|
||||
|
||||
try
|
||||
{
|
||||
var driveInfo = GetDriveInfoLinux(path);
|
||||
var driveInfo = GetDriveInfo(path);
|
||||
|
||||
if (driveInfo == null)
|
||||
{
|
||||
@ -122,7 +122,11 @@ public override void SetPermissions(string path, string mask, string user, strin
|
||||
|
||||
try
|
||||
{
|
||||
return GetDriveInfoLinux(path).TotalSize;
|
||||
var driveInfo = GetDriveInfo(path);
|
||||
|
||||
if (driveInfo == null) return null;
|
||||
|
||||
return driveInfo.TotalSize;
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
@ -132,7 +136,7 @@ public override void SetPermissions(string path, string mask, string user, strin
|
||||
return null;
|
||||
}
|
||||
|
||||
private DriveInfo GetDriveInfoLinux(string path)
|
||||
private DriveInfo GetDriveInfo(string path)
|
||||
{
|
||||
var drives = DriveInfo.GetDrives();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user