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

(cherry picked from commit a97fbcc40a6247bf59678425cf460588fd4dbecd)
pull/4779/head
Mark McDowall 4 weeks ago committed by Bogdan
parent 5f248aa25e
commit 580e4becbe

@ -181,6 +181,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