projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6ab085
)
ash: make dot command search current directory first, as bash does.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 15 Feb 2009 12:40:30 +0000
(12:40 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sun, 15 Feb 2009 12:40:30 +0000
(12:40 -0000)
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 492ccd79fc08f33f7b95dce73d9760e6c2d21f8f..3abca75fe69ddaf0b1cc2f7de7a999997a5691db 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-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