← Commit list

8ad78e1ec

Denis Vlasenko
Denis Vlasenko
2009-02-15
FAILED Duration: 30s

Subject

ash: make dot command search current directory first, as bash does.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+9 -0
@@ -11828,7 +11828,16 @@ 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 = padvance(&path, name)) != NULL) {
+ try_cur_dir:
if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode)) {
/*
* Don't bother freeing here, since it will