[Insight-users] 50 character limit in ITK on Win32?
Mark Roden
mmroden at gmail.com
Thu May 3 16:49:50 EDT 2012
Hi all,
I've just recompiled itk 4.0, and found that there's a 50 character
path limit for win32.
What's the logic behind this? I comment out that line, and everything
works perfectly fine.
The filename limit for windows is 255 (260 including the drive letter
and trailing null), but each component of the path can be 255
characters long. MacOS has the same limit for HFS+, where each
element is locked to 255, but the total path has to be 1024 or lower.
(source: http://en.wikipedia.org/wiki/Comparison_of_file_systems). If
you're not using windows-specific programming, but just treating the
path as a string, there's a 255 character limit.
With my base file path that's 66 characters long, the longest filename
I can find is 146:
C:\Users\mmroden\Documents\src\MyProjectsinQT\ExternalLibs\itk\ITK\Documentation\Migration\ConstNeighborhoodIteratorGetBoundaryConditionChange.xml
That's a far cry from 255.
Just how deep are the paths in ITK anyway? Is the directory tree
really 205 characters long? Or is this just someone guessing without
actually checking?
The problem with this is that I want to incorporate ITK building as
part of a build script, rather than having to checkin binary images
into a repo. I'd have to add a portion to the script to remove the
limit.
What if it were just set to 100?
Thanks,
Mark
More information about the Insight-users
mailing list