mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-24 06:17:08 -04:00
Fixed: Improve paths longer than 256 on Windows failing to hardlink
This commit is contained in:
parent
d738035fed
commit
a97fbcc40a
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue