mirror of https://github.com/lidarr/Lidarr
Remove stacktrace if hardlink resulted in EXDEV.
This commit is contained in:
parent
330988c4f0
commit
16b9e88bb2
|
@ -434,9 +434,22 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue