Problem doing GetLatest - File name too long

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

Moderator: SourceGear

Post Reply
msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Problem doing GetLatest - File name too long

Post by msauper » Mon May 19, 2008 3:15 pm

I am getting the following error when I try to do a Get-Latest on a file in Vault.

Code: Select all

Local file update for $/ALMS/V2.2/ALMSSecurity/ALMSSecurityServicesTest/Service References/ALMSADSecurityService/ALMSSecurityServicesTest.ALMSADSecurityService.CredentialResult.datasource failed: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
   at System.IO.Path.GetDirectoryName(String path)
   at VaultClientOperationsLib.WorkingFolder.EnsureBackupFolderExists(String filename)
   at VaultClientOperationsLib.WorkingFolder.BackupFile(VaultClientFile file)
   at VaultClientOperationsLib.WorkingFolder.UpdateWorkingFile(VaultClientFile file, Int64 targetVersion, Int64 displayVersion, MergeType merge, VaultDateTime dt, Boolean makeBackups, OverwritePrompt PromptData)
   at VaultClientOperationsLib.ClientInstance.ProcessGetFileRequests(GetFileInfo[] infos, MakeWritableType makeWritable, SetFileTimeType setFileTime, MergeType merge, Boolean updateHiddenFilesOnly, String ancestorFullPath, Boolean flat, String ancestorDiskPath, OverwritePrompt PromptData, Boolean isLabelGet, String currentPathToLabelItem, Int64 labelID, Boolean isRetry, Boolean isGetByDisplayVersion)
The actual path on disk is as follows:

Code: Select all

C:\Documents and Settings\Metro.Sauper\My Documents\Visual Studio Projects\ALMS\V2.2\ALMSSecurity\ALMSSecurityServicesTest\Service References\ALMSADSecurityService\ALMSSecurityServicesTest.ALMSADSecurityService.CredentialResult.datasource
While I admit that the path is very long, it does not seem to violate the constraints provided in the error message.

Would you be able to help me resolve this issue?

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon May 19, 2008 3:54 pm

Which version of Vault are you on?
What is the OS of your client computer?

Can you open a client, connect to a repository, then go to Help - Technical Support and post the information from there? You don't need to post the license count at the bottom.

I tried this on a Windows 2003 server and got to the exact character count without an error. I started larger though and got the error at 295 characters and then cut down.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon May 19, 2008 4:02 pm

There's other things I forgot about that when they write their paths it would be longer. Try turning off your client backups under Tools - Options - Local files - Backup and see if that makes a difference. The one problem with turning that off is that if you overwrite anything on your disk that wasn't committed to Vault, there's no backup to pull from.

There was a discussion on the path lengths here as well: Long path

msauper
Posts: 17
Joined: Fri Jan 02, 2004 3:45 pm
Location: Philadelphia , USA (EST)
Contact:

Post by msauper » Mon May 19, 2008 6:08 pm

Beth,

Here is my version Info:

Code: Select all

Client Information
    Vault Client Version: 4.1.1.18060
    .Net Framework Version: 2.0.50727.1433
    Operating System: Microsoft Windows XP Professional
    Service Pack: 3.0
    OS Version: 5.1.2600
    Total Physical Memory: 2.99 GB
    Time Zone: (GMT-05:00) Eastern Time (US & Canada)
    
Server Information
    Vault Server Version: 4.1.1.18060
    .Net Framework Version: 2.0.50727.1433
    Operating System: Microsoft(R) Windows(R) Server 2003, Standard Edition
    Service Pack: 2.0
    OS Version: 5.2.3790
    Timezone: (GMT-05:00) Eastern Time (US & Canada)
    SQL Version: Microsoft SQL Server 2005 - 9.00.3054.00 (X64) 
        	Mar 23 2007 18:41:50 
        	Copyright (c) 1988-2005 Microsoft Corporation
        	Enterprise Edition (64-bit) on Windows NT 6.0 (Build 6001: Service Pack 1)
I tried a variation of what you suggested. These files were marked as renegade. I manually removed them after verifying that there were actually no differences between them and the version in vault. I then sucessfully did a Get-Latest.

Best regards,

Metro.
Metro Sauper
President
Sauper Associates, Inc.
221 County House Road
Suite D
Sewell, NJ 08080

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Tue May 20, 2008 8:10 am

This makes sense now. If you were about to overwrite a Renegade file, then Vault would place a copy into the backup folders. I'm sure that's the path that was too long then.

Thanks for the update on your results.

EthanGreg
Posts: 1
Joined: Sat Mar 10, 2012 5:50 am

Re: Problem doing GetLatest - File name too long

Post by EthanGreg » Sat Mar 10, 2012 5:51 am

I had the similar problem and faced it a lot of times. I often solve this type of problems using "Long Path Tool". Try it and it may surely help you.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Problem doing GetLatest - File name too long

Post by Beth » Tue Mar 13, 2012 1:05 pm

EthanGreg: Thanks for posting the suggestion. We haven't tried that tool here, but this might be useful to other customers.
Beth Kieler
SourceGear Technical Support

Post Reply