Fixed: Improve paths longer than 256 on Windows failing to hardlink
This commit is contained in:
parent
b81c3ee4a8
commit
4e3bd46ad5
|
@ -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…
Reference in New Issue