Message148475
I'm not sure what rules are used by Windows to process the PATH string, but I think they are similar to the rules used to parse the command-line into argv in a C/C++ program: http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
I have tested various arrangements of double-quotes in path elements. It appears the quotes can appear anywhere, not just at the start and end of entries. As far as I can tell, *all* they do is toggle the interpretation of the semicolon character between a separator and a character in the directory path. Note in particular: quotes may surround an entire path, segments of a path, fragments of segments of a path, or even may be completely empty. Any number of quotes can appear in a single path entry. There doesn't even need to be an even number of quotes - it seems that an odd number of quotes are treated the same as if a final quote was appended to the very end of the PATH string.
Running my attached test batch file, I see these results:
c:\Users\weeble>pathtest
PATH=
FAIL
PATH=c:\Users\weeble\foo;bar
FAIL
PATH=c:\Users\weeble\"foo;bar"
SUCCESS
PATH="c:\Users\weeble\foo;bar"
SUCCESS
PATH=c:\Users\weeble\"foo;"bar
SUCCESS
PATH=c:\Users\weeble\foo";"bar
SUCCESS
PATH=c:\Users\weeble\""foo";"bar""
SUCCESS
PATH=
FAIL
PATH=c:\Users\weeble\foo";bar
SUCCESS |
|
Date |
User |
Action |
Args |
2011-11-28 12:06:09 | weeble | set | recipients:
+ weeble, loewis, tmick, edemaine, pitrou, vstinner, wrstlprmpft, giampaolo.rodola, christian.heimes, ajaksu2, sfllaw, schmir, tarek, eric.araujo, Christophe Simonis, andybuckley, r.david.murray, tleeuwenburg@gmail.com, michael.foord, brian.curtin, meatballhat, sandro.tosi, iki, Iztok.Kavkler |
2011-11-28 12:06:08 | weeble | set | messageid: <1322481968.62.0.970563141534.issue444582@psf.upfronthosting.co.za> |
2011-11-28 12:06:08 | weeble | link | issue444582 messages |
2011-11-28 12:06:07 | weeble | create | |
|