[Lazarus] Long paths manifest

Denis Kozlov dezlov at gmail.com
Tue Nov 13 08:49:42 CET 2018


Hello,

Windows API is capable of working with extended-length path for a 
maximum total path length of 32,767 characters, thus, overcoming the 
infamous 260 characters path limitation (a.k.a. MAX_PATH). To specify an 
extended-length path, use the "\\?\" prefix. For example, 
"\\?\C:\Very\Long\Path".

According to Windows Docs, one can enable the new long path behavior per 
app via the manifest:
-----------------------------
<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>
-----------------------------

Has anyone had any experience with embedding such manifest? What would 
be the best way to add such a manifest to an application, currently?

Perhaps this could be added as an option in Lazarus IDE, similarly to 
the option for enabling themes support.

For the reference:
Windows Docs - Naming Files, Paths, and Namespaces - Maximum Path Length 
Limitation
https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation

Regards,
Denis


More information about the Lazarus mailing list