VSS: % in filename

I have added to a VSS project, a file which contains a % char in the filename. For example: "Is_Old_New_65%Line.vi". When I try to Check-out the same file, VSS complains with the error: "Is_Old_New_65%Line.vi is not a valid SourceSafe syntax". Looks like VSS is treating the % as a control character, and rejects the filename. Since VSS was able to ADD the file with the % character, it should also be able to Check-out/Check-in the same file.

Has anyone else run into the same problem? Any work-arounds, besides deleting the old version, and Re-ADDing the new version, which defeats the concept of version control.

Thanks.

[628 byte] By [WesleyWong] at [2007-12-16]
# 1
This appears to be a bug in VSS 6.0d.

I get the VSS error message when I try to Check-out the file containg the % char from the VSS 'Project Difference' window, or from the Command line. When I select the file from the VSS Explorer, Check-out & Check-in works OK.

Looks like a bug to me. Check-out should work in all cases.

WesleyWong at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 2
Hi Wesley,

Do you remember what you did that allowed you to add the file with % character in the name into the VSS database?

VSS does not support the % character in filenames. Other characters that are not allowed inlcude $;:*<> , etc. So, the bug is that you shouldn't have been able to add that file in the VSS database in the first place.

Thank you,
Alin

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 3
Also, can you tell us what version of VSS are you using?
Open SSExplorer and look in Help/About box, it should be listed there

Thank you,
Alin

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 4
Hi Alin,
Thanks for your reply. The version of VSS that we are using is: 6.0d (Build 9848).
I was able to add the file with the % char through the 'Project Difference' window.
Oddly enough, when I try to add it through the VSS Explorer (Drag&Drop, or Add Files menu option), it wouldn't let me.
Too bad VSS doesn't support the chars: %$;:*<> because the application we are using (LabView from National Instruments) supports these many of these special characters (plus more) in filenames. It may be a large effort to convert many of our filenames.
Wesley
WesleyWong at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 5
Hi Wesley,

Thank you for reporting this issue. It reproduced for me with VSS2005, too.
I opened a bug and hopefully it will be fixed in RTM version.

As for restricted characters, some of them are special characters for VSS (like the $ as start of the path in VSS databases), some other like *?<>|/\:" are restricted because they are invalid for the file systems (NTFS/FAT). I don't know the reason why characters like ;% are not allowed, but there may be for a similar reason, perhaps for a different file system. I doubt any Windows application supports *<> in the file names...

Anyway, I'd recommend renaming the files in the VSS database and the ones from local disk so they won't contain such characters. Continuing to use them with restricted characters in the name may cause unknown errors and weird behavior at a later time.

Alin

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 6

This is still an issue in VSS 2005. We have filenames with the % character, and I've added them by doing a recursive add on a folder.

The files have changed, and when I attempt to check them out, I get the error "$/A/B/C/Some File With A % In The Name.File is not valid SourceSafe syntax."

When will this be fixed? Is there still an open issue against this, or should I open up a new one?

Cheers,
Jim

JimHume at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 7

> "and I've added them by doing a recursive add on a folder"

I cannot repro this with VSS2005.

I've tried both drag and drop from WinExplorer and recursive add, and I get an error like this:

Invalid SourceSafe syntax: "$/A/b/A File with % in the name.txt"

If you still have a scenario in which you can repro the problem with VSS2005 then please open a new bug.

If the files were added with VSS 6.0 and now you have database problems because of them, there isn't much what VSS2005 can do. I suggest in this case to contact product support and they can work with you to help rename those files (assuming you can't rename them with VSS Explorer).

Alin

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 8

Hey

Thanks for the prompt response.

The files were added in VSS 2005. The files in question are 12 folders deep in the tree structure. When I added the files, I added them from the 7th level downward without issue. If it's easier/better to open a bug, then I'll head that route. Although, I have no idea how...would you mind pointing me in the right direction?

Also, the only time I CANT check-out the file, is while the "view differences" window is open, having listed a few files. If I open the folder in sourcesafe and right-click the file to check it out, it works fine and doesn't throw the error.

The files in question have the '%' symbol because it's a report file that displays a percentage. We're going to rename the file in the next release, but we're too late in the cycle to do it now unfortunately.

Let me know if/how I should open a bug. I know how frustrating it is to try and solve a bug you can't reproduce!

Cheers,
Jim

JimHume at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 9
You can open bugs at http://connect.microsoft.com/VisualStudio
RichardBergMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 10
Excellent, thanks Richard!
JimHume at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 11

Not sure what the turn-around time is (if any) for bug submission, but here's the bug I submitted on the 11th of Dec, 2006.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=244635

Cheers,
Jim

JimHume at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 12

The bug was initially miscategorized by our system. It's now on my to-do.

Bugfixes that don't originate from an MS Customer Support are not released until the next service pack (or someone opens a corresponding support case).

RichardBergMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 13

I was not able to add files using A "$" in them, for instance test$1.txt won't add to a project.

Using VSS 2005.

Please let me know if there is a patch.

Thanks,

Jim

Boeing

JamesC. at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...
# 14

James, if you'll read the previous posts you'll see that '$' is not allowed in the file names - it's a special character reserved for the database root. There are other characters like %;*<> that are not allowed in filenames.

This is by design so there won't be a patch.

AlinConstantin-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...

Visual Studio

Site Classified