mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Remove stacktrace if hardlink resulted in EXDEV.
This commit is contained in:
parent
f56003e288
commit
e8d843c93d
@ -410,9 +410,21 @@ public override bool TryCreateHardLink(string source, string destination)
|
|||||||
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
Block a user