Skip to content

Commit

Permalink
Do not strip the '>LIFO' from the original command, but strip a copy!
Browse files Browse the repository at this point in the history
In case the command is within a procedure, the redirection will not
be executed at the second time.
  • Loading branch information
Jaxo committed Aug 26, 2014
1 parent a4467fd commit 9fe63cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions rexxlib/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1288,15 +1288,15 @@ void Interpreter::setProperty(Property prop, RexxString & value)
/*------------------------------------------------Interpreter::processCommand-+
| |
+----------------------------------------------------------------------------*/
void Interpreter::processCommand(RexxString & cmd, RexxString & env)
void Interpreter::processCommand(RexxString const & cmd, RexxString & env)
{
DataQueueMgr::QueueMode qmodeIn;
DataQueueMgr::QueueMode qmodeOut;
int rc;

if (!env.length() || (env == STR_ANY_SHELL) || (env == STR_DEFAULT_SHELL)) {
cmd = DataQueueMgr::stripQueueModes(cmd, qmodeIn, qmodeOut);
rc = execCommand(cmd, qmodeIn, qmodeOut, RexxString::Nil);
RexxString stripped(DataQueueMgr::stripQueueModes(cmd, qmodeIn, qmodeOut));
rc = execCommand(stripped, qmodeIn, qmodeOut, RexxString::Nil);
}else {
rc = -3;
}
Expand Down Expand Up @@ -1396,7 +1396,7 @@ void Interpreter::processTraceClause(RexxString ** ppStrCreated, int iMaxCreated
| |
+----------------------------------------------------------------------------*/
int Interpreter::execCommand(
RexxString & cmd,
RexxString const & cmd,
DataQueueMgr::QueueMode qmodeIn,
DataQueueMgr::QueueMode qmodeOut,
RexxString & res
Expand Down
4 changes: 2 additions & 2 deletions rexxlib/Interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ class Interpreter : private Constants
void setProperty(Property prop, RexxString & value);
void loadFile(Arguments & args);
void processTemplate(RexxString source);
void processCommand(RexxString & cmd, RexxString & env);
void processCommand(RexxString const & cmd, RexxString & env);
char processInteractiveTrace();
void processTraceClause(RexxString ** ppStrCreated, int iMax);
void expandRoutineArray();
int execCommand(
RexxString & cmd,
RexxString const & cmd,
DataQueueMgr::QueueMode qmodeIn,
DataQueueMgr::QueueMode qmodeOut,
RexxString & res
Expand Down

0 comments on commit 9fe63cc

Please sign in to comment.