You can read about it here, here and here.
Will TC honor it?

Moderators: Hacker, petermad, Stefan2, white
Well, this is only related to .NET (which hasn't supported long paths w/o third-party libraries earlier)..NET Blog wrote:This new capability is enabled for applications that target the .NET Framework 4.6.2 (or later).
This seems to be related to native applications too, but TC already supports long paths via mentioned prefix \\?\ so there is nothing that may be improved. But most plugins do not support long paths and may have e.g. fixed-size buffers so it is a bad idea to pass such paths to them.Jeremy Kuhne's Blog wrote:The key File and Directory Management APIs respect this and now allow you to skip the check for MAX_PATH without having to resort to using “\\?\” (look back to my earlier posts on path formats to understand how this works).
...Code: Select all
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
I'd say that's the point here. Inconsistent behavior can be unpleasantly surprising. There have been several bugs reported in TC because of this.milo1012 wrote:TC is able to use path lengths > MAX_PATH in nearly all cases.
...MVV wrote:This seems to be related to native applications too
It doesn't matter. When I compile a program or DLL in C/C++ and many other languages, I use the Windows headers. These headers define MAX_PATH to 260.umbra wrote:Actually, it's a system-wide setting.
Is there any source which states that it *will* be enabled by default one day?umbra wrote:...I wouldn't say it's DOA. Let's wait if it gets any traction. There is plenty of time until it gets enabled by default.
Compile-time constants do not affect Windows-side API so if you do not use these constants, all should be fine.milo1012 wrote:It doesn't matter. When I compile a program or DLL in C/C++ and many other languages, I use the Windows headers. These headers define MAX_PATH to 260.
So the program will have the limit set by compile time, no matter what you do in the OS later on.
That's true, and I've mentioned this too. It is a quite specific and rare setting to be able to count on it.milo1012 wrote:There is no advantage with this setting for now, except that you now *may* pass long paths to API functions w/o the infamous \\?\ prefix, but you have no guarantee for it.
Unicode API functions support long paths for years so it is not a problem (these functions disable checks if you use \\?\ prefix).BTW, a lot of API functions use data structures with an array of MAX_PATH characters.
So as a developer I'd still need to limit myself to MAX_PATH internally, no matter how long a path I may use for default file handling API functions.
I agree that this limitation made just for backward compatibility in such form is stupid (M$ could e.g. add an API for disabling limitation for current process). Another similar stupid example is X64 redirection and keeping 64-bit files in System32 folder. Unfortunately the more applications live with it, the more difficult it is to change such things...umbra wrote:Considering, that getting rid of MAX_PATH is one of the most requested features ever
These are the directory management functions that no longer have MAX_PATH restrictions if you opt-in to long path behavior: CreateDirectoryW, CreateDirectoryExW GetCurrentDirectoryW RemoveDirectoryW SetCurrentDirectoryW.
These are the file management functions that no longer have MAX_PATH restrictions if you opt-in to long path behavior: CopyFileW, CopyFile2, CopyFileExW, CreateFileW, CreateFile2, CreateHardLinkW, CreateSymbolicLinkW, DeleteFileW, FindFirstFileW, FindFirstFileExW, FindNextFileW, GetFileAttributesW, GetFileAttributesExW, SetFileAttributesW, GetFullPathNameW, GetLongPathNameW, MoveFileW, MoveFileExW, MoveFileWithProgressW, ReplaceFileW, SearchPathW, FindFirstFileNameW, FindNextFileNameW, FindFirstStreamW, FindNextStreamW, GetCompressedFileSizeW, GetFinalPathNameByHandleW.
It's not just your own code, all runtime libs are affected by this too, as they need to assume the old limit (I've seen a lot of runtime lib constraints due to this). So like I said: we need to wait for an updated SDK at least, but which will only be of use if MS forces the setting someday.MVV wrote:Compile-time constants do not affect Windows-side API so if you do not use these constants, all should be fine.
Thanks for the link.umbra wrote:BTW, according to MSDN (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx)
Sure, but optional is optional. So you either request it and don't support anything else, or you need both code paths; that's the point I don't get with this approach. The WIN32 API didn't really get any improvement over the years. MS had some chances, like e.g. dropping the ANSI API with native x64 ("Win64"), but they didn't. So now we end up with a manifest mess instead of a real improvement, like a new set of file handling functions.umbra wrote:The long-term plan is that applications have to opt-in using their manifest, as I have already written. Metro apps will have it enabled automatically.