1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-22 15:56:58 +00:00

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

This commit is contained in:
Mark McDowall 2024-04-18 21:40:22 -07:00 committed by Mark McDowall
parent d738035fed
commit a97fbcc40a

View file

@ -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)