Maximum Path Length Limitation
In editions of Windows before Windows 10 version 1607, the maximum length for a path is MAX_PATH , which is defined as 260 characters. In later versions of Windows, changing a registry key or using the Group Policy tool is required to remove the limit. See Maximum Path Length Limitation for full details.
In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH , which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\ some 256-character path string " where “” represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)
For example, you may hit this limitation if you are cloning a git repo that has long file names into a folder that itself has a long name.
you could try enabling LongPath support
Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior.
To enable the new long path behavior, both of the following conditions must be met:
- The registry key
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1. The key’s value will be cached by the system (per process) after the first call to an affected Win32 file or directory function (see below for the list of functions). The registry key will not be reloaded during the lifetime of the process. In order for all apps on the system to recognize the value of the key, a reboot might be required because some processes may have started before the key was set.
Or accessing it via UNC via prefixing *\?*