about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-25 15:35:22 -0400
committerBrad King <brad.king@kitware.com>2015-04-25 15:35:22 -0400
commite90408e91596da9fd81e77012e74bfe94b26dd83 (patch)
tree92918899558e44f3fab15c05ae03a10eca7e0f15 /src/rustllvm/RustWrapper.cpp
parent83263b48c39ef0e21cc9872191f4ce4877f4e05f (diff)
downloadrust-e90408e91596da9fd81e77012e74bfe94b26dd83.tar.gz
rust-e90408e91596da9fd81e77012e74bfe94b26dd83.zip
std: Fix process spawn for arguments ending in backslashes on Windows
Fix `make_command_line` for the case of backslashes at the end of an
argument requiring quotes.  We must encode the command and arguments
such that `CommandLineToArgvW` recovers them in the spawned process.
Simplify the logic by using a running count of backslashes as they
are encountered instead of looking ahead for quotes following them.

Extend `test_make_command_line` to additionally cover:

* a leading quote in an argument that requires quotes,
* a backslash before a quote in an argument that requires quotes,
* a backslash at the end of an argument that requires quotes, and
* a backslash at the end of an argument that does not require quotes.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions