Thursday, January 22, 2015

svn: The filename, directory name or volume label syntax is incorrect.

I recently came up against the following error while checking out code using Subversion (svn client v1.6.17) on a Windows 8.1 machine:

svn up
A    modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img
...

A    modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img\preloader-40x40.gif
A    modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img\sprite.png:Zone.Identifier A    modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img\avatar.png
svn: In directory 'modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img'
svn: Can't move 'modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img\svn-A5B0B865' to 'modules\distribution\repository\conf\ues\jaggeryapps\social\themes\default\img\sprite.png:Zone.Identifier': The filename, directory name or volume label syntax is incorrect.


The error message "Can't move 'path\to\file\img\svn-A5B0B865' to 'full\path\to\file\img\sprite.png:Zone.Identifier': The filename, directory name or volume label syntax is incorrect." wasn't particularly informative.

Attempts to do an "svn cleanup" failed. Based on the suggestions in the answers I found, I decided to delete the "lock" and "log" files in the ".svn" folder of the path mentioned in the error, as well as the contents of the ".svn/prop-base" and ".svn/text-base" folders.

The error remained. The error message sounded like svn was not able to move a temporary file into its final location on Windows. I navigated to the path of the file in the repo I was trying to check out from.  It turns out that the file in question has a name that uses characters that would make it an invalid file name on Windows. The offending file was named "sprite.png:Zone.Identifier" -- it contains the colon ":" which is disallowed in Windows file names.

My workaround was to check out the code on a Linux machine and copy it over to Windows.


No comments:

Post a Comment