2 ms·
There are issues other than component length. HFS+ happily stores characters in paths that NTFS does not accept such as | and $ (and, I think to this day, /. T
by Someone 12y ago
There are issues other than component length.
HFS+ happily stores characters in paths that NTFS does not accept such as | and $ (and, I think to this day, /. Traditional Mac OS used colons as path separators. The Mac OS X Unix layer swapped colons and slashes)
Also, NTFS and HFS+ use different Unicode normalization algorithms (IIRC, the Mac decomposes strings; that would make Mac paths longer in some cases)
If you look closely, it is a miracle that we can have interop between different file systems at all. There is a lot of ugliness here. For example, see what Microsoft says about that 255 character limit:
"The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters*)."
So, before starting that copy, you really should query the target disk for its maximum pathname component length.
Finding hat disk in the presence of reparse points, substituted drives, etc. may be a challenge in itself.