There is no 260 character limit on Windows. There was indeed one in Windows 95 due to FAT32 limitations. But ever since NT4 with NTFS (That's 20 years ago!), Windows supports at least 64KB paths. Their real mistake was to invent that awful \\?\ trick for unlocking the new capability, presumably to prevent a buffer overflow in one of their old applications.

The real fix is not to try using the \\?\ prefix in your program. Instead, the real fix would be to silently insert that prefix inside mingw file I/O libraries. This way, every time a program opens a file the standard way, it just works, whatever the pathname length.
I've done that in my MSVC Library eXtension, and suddenly all my programs were magically able to access illimited paths.

I've long thought about contributing that fix to MinGW, but I'm afraid of the effort that would be needed to find all the places that need to be changed. If anybody has good experience with the low level file I/O sources in mingw, I'd be happy to discuss with him about what precisely needs to be done.

 

Last edit: Jean-Francois LARVOIRE 2017-09-29