How to enable long paths on Windows?
Historically, operating systems used to have limitations of maximum path length. For example, when an absolute path is required, the full path couldn't exceed this size.
Most modern operating systems and file systems have removed this limitation. Verific does not have this limitation and is dependent on the host OS. Windows and its applications do not support long paths, by default. So, it may need some setup to enable support for the long paths.
If long paths are not enabled on Windows, we will fail to open/read a file with a long path name which will produce errors.
To enable long path name support, you need to have both of the following set to be able to read a file with a long path name:
(1) Property LongPathsEnabled should be set to 1 under the following registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\
(2) During compilation/building, longPathAware element should be set to true. The application manifest must also include the longPathAware element. Add the following to the manifest file:
<application xmlns="urn:schemas-microsoft-com:asm.v3"> <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> <ws2:longPathAware>true</ws2:longPathAware> </windowsSettings> </application>
For more details on enabling long paths on Windows, please refer to these links:
https://stackoverflow.com/questions/6829691/opening-long-file-names-in-windows-using-fopen-with-c