diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-20 20:39:31 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-20 20:39:31 -0700 |
commit | b08fb866378693d2e75f17fdfe5e60401a29136a (patch) | |
tree | ad1eb00129b96d284ab9ed4ca2de1cc176219777 /parser.cpp | |
parent | b290fd33b973e573ffc7fc0c87be3ab431678b5f (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.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |