Fixed: Improve paths longer than 256 on Windows failing to hardlink

pull/6580/head^2
Mark McDowall 4 weeks ago committed by Mark McDowall
parent d738035fed
commit a97fbcc40a

@ -170,6 +170,11 @@ namespace NzbDrone.Windows.Disk
{
try
{
if (source.Length > 256 && !source.StartsWith(@"\\?\"))
{
source = @"\\?\" + source;
}
return CreateHardLink(destination, source, IntPtr.Zero);
}
catch (Exception ex)

Loading…
Cancel
Save