Fixed: Logging error when accessing mount point

Fixes #1993
pull/2116/head
Mark McDowall 7 years ago committed by Taloth
parent 6bfb790eb8
commit 2246dfab05

@ -40,8 +40,6 @@ namespace NzbDrone.Mono.Disk
{
Ensure.That(path, () => path).IsValidPath();
try
{
var mount = GetMount(path);
if (mount == null)
@ -52,13 +50,6 @@ namespace NzbDrone.Mono.Disk
return mount.AvailableFreeSpace;
}
catch (InvalidOperationException ex)
{
Logger.Error(ex, "Couldn't get free space for {0}", path);
}
return null;
}
public override void InheritFolderPermissions(string filename)
{
@ -100,20 +91,9 @@ namespace NzbDrone.Mono.Disk
{
Ensure.That(path, () => path).IsValidPath();
try
{
var mount = GetMount(path);
if (mount == null) return null;
return mount.TotalSize;
}
catch (InvalidOperationException e)
{
Logger.Error(e, "Couldn't get total space for {0}", path);
}
return null;
return mount?.TotalSize;
}
public override bool TryCreateHardLink(string source, string destination)

Loading…
Cancel
Save