mirror of
https://github.com/Radarr/Radarr
synced 2025-02-22 22:31:26 +00:00
Adjusted the Windows LongPath support check for valid segment lengths
(cherry picked from commit 52c6bc5549ab998ccc018d138c55f8f924eed6d3)
This commit is contained in:
parent
1ed8bd7350
commit
a9b2635cb0
1 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,10 @@ private static void DetectLongPathLimits()
|
|||
{
|
||||
try
|
||||
{
|
||||
Path.GetDirectoryName($@"C:\{new string('a', 300)}\ab");
|
||||
// Windows paths can be up to 32,767 characters long, but each component of the path must be less than 255.
|
||||
// If the OS does not have Long Path enabled, then the following will throw an exception
|
||||
// ref: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
|
||||
Path.GetDirectoryName($@"C:\{new string('a', 254)}\{new string('a', 254)}");
|
||||
MAX_PATH = 4096;
|
||||
}
|
||||
catch
|
||||
|
|
Loading…
Reference in a new issue