]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - findcmd.c
commit bash-20141017 snapshot
[thirdparty/bash.git] / findcmd.c
index 9f3d954fb079418782eec19d4c818eb16dd9c80a..e66769199c0bccb2e810c7775db23013e424cfd0 100644 (file)
--- a/findcmd.c
+++ b/findcmd.c
@@ -69,7 +69,7 @@ static char *file_to_lose_on;
 
 /* Non-zero if we should stat every command found in the hash table to
    make sure it still exists. */
-int check_hashed_filenames;
+int check_hashed_filenames = CHECKHASH_DEFAULT;
 
 /* DOT_FOUND_IN_SEARCH becomes non-zero when find_user_command ()
    encounters a `.' as the directory pathname while scanning the
@@ -478,7 +478,7 @@ find_in_path_element (name, path, flags, name_len, dotinfop)
   int status;
   char *full_path, *xpath;
 
-  xpath = (*path == '~') ? bash_tilde_expand (path, 0) : path;
+  xpath = (posixly_correct == 0 && *path == '~') ? bash_tilde_expand (path, 0) : path;
 
   /* Remember the location of "." in the path, in all its forms
      (as long as they begin with a `.', e.g. `./.') */