[commit: ghc] master: Fix slash escaping in cwrapper.c (bca56bd)
git at git.haskell.org
git at git.haskell.org
Thu Jun 8 06:15:40 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/bca56bd040de64315564cdac4b7e943fc8a75ea0/ghc
>---------------------------------------------------------------
commit bca56bd040de64315564cdac4b7e943fc8a75ea0
Author: Tamar Christina <tamar at zhox.com>
Date: Tue Jun 6 16:16:32 2017 +0100
Fix slash escaping in cwrapper.c
Summary: Escape `\` in paths on Windows in `cwapper.c` when we re-output the paths.
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13666
Differential Revision: https://phabricator.haskell.org/D3628
>---------------------------------------------------------------
bca56bd040de64315564cdac4b7e943fc8a75ea0
driver/utils/cwrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/driver/utils/cwrapper.c b/driver/utils/cwrapper.c
index da6cec4..5a30274 100644
--- a/driver/utils/cwrapper.c
+++ b/driver/utils/cwrapper.c
@@ -59,7 +59,7 @@ char *flattenAndQuoteArgs(char *ptr, int argc, char *argv[])
*ptr++ = '"';
src = argv[i];
while(*src) {
- if (*src == '"') {
+ if (*src == '"' || *src == '\\') {
*ptr++ = '\\';
}
*ptr++ = *src++;
More information about the ghc-commits
mailing list