The specified path, file name, or both are too long

If you are having a problem using Vault, post a message here.

Posts: 63
Joined: Thu Oct 25, 2007 8:11 am
Location: UK
PostPosted: Thu Apr 27, 2017 10:31 am
Hi Some of our users are getting the error "The specified path, file name, or both are too long." when getting our code out, as far as we can tell none of our files should produce a path longer than the 248 character limit but we are still getting this error. Unfortunately the error does not report the name of the file that is causing the error so we are at a bit of a loss as to what to do.
We would rather not force people to move their build folders nearer the root as they are not that far from root anyway, (most are something like d:\build\Version6\ )

I have seen this item: https://support.sourcegear.com/viewtopic.php?f=5&t=20183 which suggests moving the cache folder location but again it doesn't look like the cache files should be generating a file name in excess of 248 characters.
Any help would be most appreciated.
Ian.

Posts: 8448
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: Thu Apr 27, 2017 10:39 am
When setting working folders, if the working folder is set at $ and then goes to a long disk path, such as C:\Users\Username\Documents\some folder\some folder\etc, then the full path as one goes through the tree is $ + whatever path to the lowest level file + C:\Users\Username\Documents\some folder\some folder\etc. That means once it gets to $/a/b/c/d/e/f/g/h/file.txt, the actual path to consider is C:\Users\Username\Documents\some folder\some folder\etc\a\b\c\d\e\f\g\h\file.txt.

What a user can do is they can keep their working folder set, but at a lower level override the working folder inheritance and set it at a lower level as well and see if that helps.
Beth Kieler
SourceGear Technical Support

Posts: 63
Joined: Thu Oct 25, 2007 8:11 am
Location: UK
PostPosted: Fri Apr 28, 2017 2:28 am
Hi,
Thanks for the reply, unfortunately that doesn't really help, we don't want to micro manage each project to force it lower in the folder structure and we need a sensible way to organize things anyway. Our repository structure looks like this:
Code: Select all
$¬-Branches¬-V1--Source¬-Bin
 |         |           |-Server¬-Common¬-CommonAssembly1¬-Namespace1
 |         |           |       |       |                L-Namespace2
 |         |           |       |       L-CommonAssembly2
 |         |           |       |     
 |         |           |       |-DataLayer¬-DataAssembly1
 |         |           |       |          |-DataAssembly2
 |         |           |       |          L-DataAssembly3
 |         |           |       |     
 |         |           |       |-LogicLayer¬-LogicAssembly1
 |         |           |       |           |-LogicAssembly2¬-Namespace1¬-ClassFolder1¬-Class1
 |         |           |       |           |               |           |             |-Class2
 |         |           |       |           |               |           |             L-Class3
 |         |           |       |           |               |           L-ClassFolder2
 |         |           |       |           |               L-Namespace2
 |         |           |       |           L-LogicAssembly3
 |         |           |       |     
 |         |           |       L-ServiceLayer¬-ServiceAssembly1
 |         |           |                     |-ServiceAssembly2
 |         |           |                     L-ServiceAssembly3
 |         |           |
 |         |           |-Presentation
 |         |           |-ThirdParty
 |         |           L-Utilities
 |         |-V2
 |         L-V3
 L-Trunk¬-Source¬-Bin
                |-Server¬-Common¬-CommonAssembly1
                |       |       L-CommonAssembly2
                |       |-DataLayer¬-DataAssembly1
                |       |          |-DataAssembly2
                |       |          L-DataAssembly3
                |       |     
                |       |-LogicLayer¬-LogicAssembly1
                |       |           |-LogicAssembly2
                |       |           L-LogicAssembly3
                |       L-ServiceLayer¬-ServiceAssembly1
                |                     |-ServiceAssembly2
                |                     L-ServiceAssembly3
                |
                |-Presentation
                |-ThirdParty
                L-Utilities


The working folder for $ will be set to something like D:\Build\gui300 so i don't think we are using an excessively deep folder structure, especially as we need to be able to work on multiple versions at the same time.
I note that Microsoft have made some steps to enable working around the path length problem in windows 10:
https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/

Can vault be configured/modified to work with the new long path support?

Posts: 8448
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: Fri Apr 28, 2017 7:56 am
I have a feature request open I can add your vote to.

In the meantime, let's turn on debug logging to try and identify the approximate location. Use the KB articles Using Debug Logging for Troubleshooting to set up your logging. you can then either post your logs here or you can email them to support at sourcegear.com.
Beth Kieler
SourceGear Technical Support

Return to Support (Vault Professional)

Who is online

Users browsing this forum: No registered users and 5 guests