Long paths do not require the \\?\
prefix to work[…]
Without that prefix, support for long paths NEEDS to be enabled in Windows 10 and the MS-docs are REALLY clear about that:
To enable the new long path behavior, both of the following conditions must be met:[…]
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later
There are hundreds of other resources saying exactly the same and lots of other projects dealing with exactly the same issues in the same way. Not sure what you actually tested, but you might simply have a wrong impression:
The key’s value will be cached by the system[…]
Keep additionally in mind that Windows internally sometimes rewrites paths to use shorter 8.3-notation maintained in the background as well. Another reason why things might look like they succeed, while it’s actually not the desired behaviour.
Additionally, for some reason this concrete group policy doesn’t seem to have a default value. So once that setting has been enabled, if one puts it back to “not configured” afterwards, the enabled(!) value persists. One needs to explicitly choose “disabled”, which disables the option AND afterwards “not configured” keeps things disabled. So you most likely simply didn’t test what you expected to test.
Use something like “cmd.exe” instead, that can be closed and started with the group policy setting changed without the need to restart the whole system. You can easily test an enabled vs. disabled option using the following in a new cmd.exe:
cd C:\Users\tschoening\Downloads\sublime\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
That either succeeds or fails, depending on the group policy setting.
Looking at the manifest file of your Sublime-Exe, I don’t understand how this can even work at all, because your manifest simply lacks the additional necessary option:
<ws2:longPathAware>true</ws2:longPathAware>
vs. Sublime Text 3:
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
vs. cmd.exe:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
Therefore it makes totally sense that long paths don’t work properly for me, even after enabling the new setting. The following happens when opening a file in the formerly mentioned long directory:
Sublime wasn’t able to open the file properly and instead only recognized it existed, but couldn’t read its content.