diff --git a/src/NzbDrone.Mono/Disk/DiskProvider.cs b/src/NzbDrone.Mono/Disk/DiskProvider.cs index 8f6b6d046..6ea2549dd 100644 --- a/src/NzbDrone.Mono/Disk/DiskProvider.cs +++ b/src/NzbDrone.Mono/Disk/DiskProvider.cs @@ -418,9 +418,22 @@ public override bool TryCreateHardLink(string source, string destination) fileInfo.CreateLink(destination); 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) { - _logger.Debug(ex, string.Format("Hardlink '{0}' to '{1}' failed.", source, destination)); + _logger.Debug(ex, "Hardlink '{0}' to '{1}' failed.", source, destination); return false; } }