From 763ded488cc798e4456a37fd0c4268e0060c426f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 24 Apr 2014 13:21:22 -0400 Subject: [PATCH] CmdExec - Converted from A3 to A3t. - Standardized on A3t::getWords, and unquoted args to run. This ought to fix a bug, but I'm on a plane and cannot look at the bug right now. --- src/commands/CmdExec.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/commands/CmdExec.cpp b/src/commands/CmdExec.cpp index ca22996da..3a058d1fe 100644 --- a/src/commands/CmdExec.cpp +++ b/src/commands/CmdExec.cpp @@ -24,10 +24,12 @@ // //////////////////////////////////////////////////////////////////////////////// +#include // TODO Remove #include #include #include #include +#include #include extern Context context; @@ -46,21 +48,7 @@ CmdExec::CmdExec () int CmdExec::execute (std::string& output) { std::string command_line; - std::vector ::iterator arg; - for (arg = context.a3.begin (); arg != context.a3.end (); ++arg) - { - if (arg != context.a3.begin () && - arg->_raw != "execute" && - arg->_category != Arg::cat_rc && - arg->_category != Arg::cat_override) - { - if (command_line.length ()) - command_line += " "; - - command_line += "'" + arg->_raw + "'"; - } - } - + join (command_line, " ", context.a3t.getWords ()); return system (command_line.c_str ()); }