Trailing space in folder name causes problem

648 views
Skip to first unread message

John

unread,
Jul 19, 2011, 11:05:11 PM7/19/11
to us...@tortoisesvn.tigris.org
Don't know if this is a Tortoise &/or SVN issue.
Using the repo browser to 'copy to' a new folder, the folder name was entered in with a trailing space unintentionally.
This then causes an error when doing a check-out/update of that folder or higher level folders.
"Update
Can't create directory 'C:\ ... \.svn': The system cannot
find the path specified."
Lower level folders checkout ok.
The workaround is easy, use repo browser to rename the folder, removing the trailing space.
Not a biggie but a bug nontheless.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798286

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Andy Levy

unread,
Jul 20, 2011, 12:10:07 AM7/20/11
to us...@tortoisesvn.tigris.org
On Tue, Jul 19, 2011 at 23:05, John <gupd4...@snkmail.com> wrote:
> Don't know if this is a Tortoise &/or SVN issue.
> Using the repo browser to 'copy to' a new folder, the folder name was entered in with a trailing space unintentionally.
> This then causes an error when doing a check-out/update of that folder or higher level folders.
> "Update
> Can't create directory 'C:\ ...  \.svn': The system cannot
> find the path specified."
> Lower level folders checkout ok.
> The workaround is easy, use repo browser to rename the folder, removing the trailing space.
> Not a biggie but a bug nontheless.

Does Windows allow you to create a directory with a trailing space in
the name in the first place (outside Subversion)? IIRC, it doesn't (I
don't have a Windows system at hand at the moment). If not, the issue
is really that Subversion, being cross-platform, allows you to
create/store/manage items which violate the naming rules on some OSes
because those rules don't exist on others.

There is no solution to this aside from creating a pre-commit hook
script which disallows committing filenames which violate the rules of
any OS (to allow full interoperability on all platforms).

See http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for
MS's rules on filenames & paths, including trailing spaces.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798369

John

unread,
Jul 20, 2011, 12:35:30 AM7/20/11
to us...@tortoisesvn.tigris.org
>On Tue, Jul 19, 2011 at 23:05, John <gupd4...@snkmail.com> wrote:
>> Don't know if this is a Tortoise &/or SVN issue.
>>. Using the repo browser to 'copy to' a new folder, the folder name was entered in with a trailing space unintentionally.

>> This then causes an error when doing a check-out/update of that folder or higher level folders.
>> "Update
>> Can't create directory 'C:\ ...  \.svn': The system cannot find the
>> path specified."
>> Lower level folders checkout ok.
>> The workaround is easy, use repo browser to rename the folder, removing the trailing space.
>> Not a biggie but a bug nontheless.

> Does Windows allow you to create a directory with a trailing space in the name in

> the first place (outside Subversion)? IIRC, it doesn't (I don't have a Windows system
>at hand at the moment). If not, the issue is really that Subversion, being cross-
>platform, allows you to create/store/manage items which violate the naming rules on >some OSes because those rules don't exist on others.

>There is no solution to this aside from creating a pre-commit hook script which
>disallows committing filenames which violate the rules of any OS (to allow full
>interoperability on all platforms).

>See http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for MS's rules
>on filenames & paths, including trailing spaces.

It's not a big issue. I just mentioned it in case Stefan wanted to add some checking to the file/foldername entry dialog boxes in the repo browser. This would be assuming users don't want to use TSVN to administer repos that have unix files stored with names not windows compliant - hopefully thats a safe bet.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798420

Andy Levy

unread,
Jul 20, 2011, 6:13:50 AM7/20/11
to us...@tortoisesvn.tigris.org
On Wed, Jul 20, 2011 at 00:35, John <gupd4...@snkmail.com> wrote:
>>On Tue, Jul 19, 2011 at 23:05, John <gupd4...@snkmail.com> wrote:
>>> Don't know if this is a Tortoise &/or SVN issue.
>>>. Using the repo browser to 'copy to' a new folder, the folder name was entered in with a trailing space unintentionally.
>>> This then causes an error when doing a check-out/update of that folder or higher level folders.
>>> "Update
>>> Can't create directory 'C:\ ...  \.svn': The system cannot find the
>>> path specified."
>>> Lower level folders checkout ok.
>>> The workaround is easy, use repo browser to rename the folder, removing the trailing space.
>>> Not a biggie but a bug nontheless.
>
>> Does Windows allow you to create a directory with a trailing space in the name in
>> the first place (outside Subversion)? IIRC, it doesn't (I don't have a Windows system
>>at hand at the moment). If not, the issue is really that Subversion, being cross-
>>platform, allows you to create/store/manage items which violate the naming rules on >some OSes because those rules don't exist on others.
>
>>There is no solution to this aside from creating a pre-commit hook script which
>>disallows committing filenames which violate the rules of any OS (to allow full
>>interoperability on all platforms).
>
>>See http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for MS's rules
>>on filenames & paths, including trailing spaces.
>
> It's not a big issue. I just mentioned it in case Stefan wanted to add some checking to the file/foldername entry dialog boxes in the repo browser. This would be assuming users don't want to use TSVN to administer repos that have unix files stored with names not windows compliant - hopefully thats a safe bet.

I do not think that's a safe assumption to make on behalf of all TSVN
users. If it were to become a feature, I would see it being an option
which is off by default.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798826

David Balažic

unread,
Jul 20, 2011, 7:04:00 AM7/20/11
to us...@tortoisesvn.tigris.org

As TSVN is a Windows tool, an unobtrusive warning (that can be turned off permanemtly)
could be a good compromise. A message in a part of the GUI saying
"Warning, this filename is not a valid on Windows"

Maybe with a button/link for more info.

David

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798839

Andy Levy

unread,
Jul 20, 2011, 8:40:35 AM7/20/11
to us...@tortoisesvn.tigris.org

That wouldn't solve the most common source of filename problems for
Windows clients - clients on other OSes creating filenames that are
valid there, but invalid on Windows (case collisions are probably more
common than trailing spaces on directory names).

Protect at the repository level via a hook script and all your bases
are covered.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798859

David Balažic

unread,
Jul 20, 2011, 11:03:03 AM7/20/11
to us...@tortoisesvn.tigris.org

No, but it would solve the issue of the thread topic.

> Windows clients - clients on other OSes creating filenames that are
> valid there, but invalid on Windows (case collisions are probably more
> common than trailing spaces on directory names).
>
> Protect at the repository level via a hook script and all your bases
> are covered.

Regards,
David

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2798933

Reply all
Reply to author
Forward
0 new messages