Monday, June 12, 2006

Source control path length limitation

When defining folders in source code control repository (or adding local paths hierarchies) it may be useful to keep in mind that maximum path length (of concatenated path) may not exceed 260 characters both for server and local path.

I thought that the days of MAX_PATH (for those who are in the know) are long gone, but it appears that TFS has the maximum length limit in its database (see post about the issue).

To make a personal confession, having upper limit imposed is not any problem for me. Sensible folder hierarchies and file names should not take more anyway.

Generally, the most probable case for the issue to occur is to use long local paths (the worst ones of the form C:\Documents and Settings\dumb_user\My Documents\Visual Studio 8\Projects\...) - but in those cases the user education will solve the issue. It may be even for the better that such users will receive maximum length error - source code has no place in My Documents.


Anonymous said...

"C:\Documents and Settings\dumb_user\My Documents\Visual Studio 8\Projects\"

dumb_user or dumb_default?

eugenez said...

If you ask me - I'd say dumb_user (as default is easily changeable); I am always amazed at people who store important things twenty levels deep into folder hierarchy :)