Remove stacktrace if hardlink resulted in EXDEV.

This commit is contained in:
Taloth Saldono 2020-06-14 14:55:27 +02:00
parent f56003e288
commit e8d843c93d
1 changed files with 13 additions and 1 deletions

View File

@ -410,9 +410,21 @@ namespace NzbDrone.Mono.Disk
fileInfo.CreateLink(destination); fileInfo.CreateLink(destination);
return true; return true;
} }
catch (UnixIOException ex)
{
if (ex.ErrorCode == Errno.EXDEV)
{
Logger.Trace("Hardlink '{0}' to '{1}' failed due to cross-device access.", source, destination);
}
else
{
Logger.Debug(ex, "Hardlink '{0}' to '{1}' failed.", source, destination);
}
return false;
}
catch (Exception ex) catch (Exception ex)
{ {
Logger.Debug(ex, string.Format("Hardlink '{0}' to '{1}' failed.", source, destination)); Logger.Debug(ex, "Hardlink '{0}' to '{1}' failed.", source, destination);
return false; return false;
} }
} }