Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
39104: do not hash relative paths in findcmd()
  • Loading branch information
bartschaefer committed Aug 26, 2016
1 parent 317c96b commit b312abc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2016-08-26 Barton E. Schaefer <schaefer@zsh.org>

* 39104: Src/exec.c: do not hash relative paths in findcmd()

2016-08-25 Daniel Shahaf <d.s@daniel.shahaf.name> 2016-08-25 Daniel Shahaf <d.s@daniel.shahaf.name>


* 39102: Completion/Unix/Command/_git: __git_recent_branches: * 39102: Completion/Unix/Command/_git: __git_recent_branches:
Expand Down
2 changes: 1 addition & 1 deletion Src/exec.c
Expand Up @@ -772,7 +772,7 @@ findcmd(char *arg0, int docopy)
Cmdnam cn; Cmdnam cn;


cn = (Cmdnam) cmdnamtab->getnode(cmdnamtab, arg0); cn = (Cmdnam) cmdnamtab->getnode(cmdnamtab, arg0);
if (!cn && isset(HASHCMDS)) if (!cn && isset(HASHCMDS) && !isrelative(arg0))
cn = hashcmd(arg0, path); cn = hashcmd(arg0, path);
if ((int) strlen(arg0) > PATH_MAX) if ((int) strlen(arg0) > PATH_MAX)
return NULL; return NULL;
Expand Down

0 comments on commit b312abc

Please sign in to comment.