[RFC] strip out trailing quote character in file paths?

Alexander Belchenko bialix at ukr.net
Wed Dec 5 12:47:44 GMT 2007


I have some troubles with my shell environment (with FAR file manager in 
particular).
Often when I need full path to another branch I simply Ctrl+Enter its 
path from FAR panel (FAR lacks %D feature of Midnight Commander).
But FAR try to be smart and quote paths (with ") that contains spaces, 
+, ! and other special characters. Unfortunately FAR substitute full 
path to directory with trailing backslash (\) and hence my problem.
If full path contains special characters I end up with:

bzr branch "C:\My Documents\my\branch\"

But MS shell interpret last 2 characters as simply ",
and bzr eventually got the 3rd argument (literally) as:

C:\My Documents\my\branch"

And of course, bzr is unable to find such paths and generate error.
It's very annoying to check full path every time and very tiring delete 
trailing slash by hands.

IIRC, bzr does not allow " character in paths? Or am I wrong here?
Windows does not allow such character in paths when someone try to 
create new file or directory (actually list of forbidden characters is \ 
/ :  * ? " < > | ).

I want to provide patch to automatically fix such broken paths inside 
bzr. Should I emit warning when " automatically stripped?
Does such patch should be win32-specific or for all OSes? I know
on Linux user may use almost all characters in filenames, but bzr anyway 
has some limitations here.

Alexander.



More information about the bazaar mailing list