[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Square brackets in file names and authz (in VisualSVN 2.5.5)

From: David Brodbeck <brodbd_at_uw.edu>
Date: Wed, 11 Jul 2012 17:20:15 -0700

On Wed, Jul 11, 2012 at 8:01 AM, Matthew Pounsett <matt_at_conundrum.com> wrote:
> I note by your examples that you're using a unix filesystem (as opposed to Windows). I would be a little surprised if this worked there, since the square brackets are normally used by unix shells as glob metacharacters, similarly to * and ?.

Just because they're used as shell metacharacters doesn't mean they
aren't legal in filenames:

brodbd_at_patas:~/foo$ touch \*foo\*
brodbd_at_patas:~/foo$ touch \?bar\?
brodbd_at_patas:~/foo$ touch \[biz\]
brodbd_at_patas:~/foo$ ls -l
total 2
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 ?bar?
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 [biz]
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 *foo*

That's not to say they're a good *idea*, as they tend to make
scripting tricky, but the filesystem won't complain.

>> It's also worth pointing out that some paths have the "#" character in them. What do I do when I get to those?
>
> This is commonly comment character. It's possible to create a file with this character in it, but personally I'd avoid it. It's possible you could escape it like so: "tmp\#1.txt", but I'm not confident that will work. If svn can't deal with this one you might have a case for it being a bug, since it is technically a legal file name.

emacs uses files starting and ending in "#" extensively for autosave
recovery data, FWIW.

-- 
David Brodbeck
System Administrator, Linguistics
University of Washington
Received on 2012-07-12 02:20:49 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.