From 1457cdf3d7615f42d33246fb456bcb4332b35e6a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 19 Dec 2022 14:20:21 +0200 Subject: Disable `)` escaping in buildspec, command line variable overrides Similar to line continuations, that would make directory paths on Windows unusable, for example: b info(C:\myproj\) Note that while this is less of a problem in command line variable overrides, we disable it there for consistency. --- libbuild2/parser.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libbuild2/parser.cxx') diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 2c8c8a6..0d51b49 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -8163,14 +8163,13 @@ namespace build2 buildspec parser:: parse_buildspec (istream& is, const path_name& in) { - // We do "effective escaping" of the special `'"\$(` characters plus `)` - // for symmetry (basically what's escapable inside a double-quoted literal - // plus the single quote; note, however, that we exclude line - // continuations since they would make directory paths on Windows - // unusable). + // We do "effective escaping" of the special `'"\$(` characters (basically + // what's escapable inside a double-quoted literal plus the single quote; + // note, however, that we exclude line continuations and `)` since they + // would make directory paths on Windows unusable). // path_ = ∈ - lexer l (is, *path_, 1 /* line */, "\'\"\\$()"); + lexer l (is, *path_, 1 /* line */, "\'\"\\$("); lexer_ = &l; root_ = &ctx->global_scope.rw (); -- cgit v1.1