mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-07 19:42:49 +01:00
Fixed: Improve paths longer than 256 on Windows failing to hardlink
(cherry picked from commit a97fbcc40a6247bf59678425cf460588fd4dbecd)
This commit is contained in:
parent
93a852841f
commit
b3a8b99f9a
@ -170,6 +170,11 @@ public override bool TryCreateHardLink(string source, string destination)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (source.Length > 256 && !source.StartsWith(@"\\?\"))
|
||||
{
|
||||
source = @"\\?\" + source;
|
||||
}
|
||||
|
||||
return CreateHardLink(destination, source, IntPtr.Zero);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
Reference in New Issue
Block a user