aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-20 20:39:31 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-07-20 20:39:31 -0700
commitb08fb866378693d2e75f17fdfe5e60401a29136a (patch)
treead1eb00129b96d284ab9ed4ca2de1cc176219777 /parser.cpp
parentb290fd33b973e573ffc7fc0c87be3ab431678b5f (diff)
Renamed env_vars to env_vars_snapshot_t
Cleanup of non-wcstring version of path_get_path
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/parser.cpp b/parser.cpp
index f63df9a2..1e462ba7 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -1979,16 +1979,16 @@ int parser_t::parse_job( process_t *p,
*/
if( current_block->skip )
{
- p->actual_cmd = wcsdup(L"");
+ p->actual_cmd.clear();
}
else
{
int err;
- p->actual_cmd = path_get_path( args.at(0).completion.c_str() );
+ bool has_command = path_get_path(args.at(0).completion, &p->actual_cmd);
err = errno;
bool use_implicit_cd = false;
- if (p->actual_cmd == NULL)
+ if (! has_command)
{
/* If the specified command does not exist, try using an implicit cd. */
wcstring implicit_cd_path;
@@ -2008,7 +2008,7 @@ int parser_t::parse_job( process_t *p,
}
/* Check if the specified command exists */
- if( p->actual_cmd == NULL && ! use_implicit_cd )
+ if( ! has_command && ! use_implicit_cd )
{
int tmp;