From 2dcb6eb0b3d7574b9fa97f962b715bebe1d043ef Mon Sep 17 00:00:00 2001 From: Nicolas Schneider Date: Sat, 26 Jan 2019 11:12:08 +0100 Subject: [PATCH] vs: escape embedded quotes of run targets --- mesonbuild/backend/vs2010backend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 939f7b44f..4ae41f826 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -509,6 +509,9 @@ class Vs2010Backend(backends.Backend): elif isinstance(i, File): relfname = i.rel_to_builddir(self.build_to_src) cmd.append(os.path.join(self.environment.get_build_dir(), relfname)) + elif isinstance(i, str): + # Escape embedded quotes, because we quote the entire argument below. + cmd.append(i.replace('"', '\\"')) else: cmd.append(i) cmd_templ = '''"%s" ''' * len(cmd)