ash: revert "make dot command search current directory first"

Reverts this:
    commit 8ad78e1ec7
    Author: Denis Vlasenko <vda.linux@googlemail.com>
    Date:   Sun Feb 15 12:40:30 2009 +0000
    ash: make dot command search current directory first, as bash does.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-01-10 15:18:38 +01:00
parent 265062d59d
commit 2b4c258e74

View File

@ -12502,16 +12502,7 @@ find_dot_file(char *name)
if (strchr(name, '/'))
return name;
/* IIRC standards do not say whether . is to be searched.
* And it is even smaller this way, making it unconditional for now:
*/
if (1) { /* ENABLE_ASH_BASH_COMPAT */
fullname = name;
goto try_cur_dir;
}
while ((fullname = path_advance(&path, name)) != NULL) {
try_cur_dir:
if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) {
/*
* Don't bother freeing here, since it will