mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-27 02:04:22 +00:00
Remove stacktrace if hardlink resulted in EXDEV.
Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
@@ -424,9 +424,22 @@ namespace NzbDrone.Mono.Disk
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user