summaryrefslogtreecommitdiff
path: root/findutils/find.c
diff options
context:
space:
mode:
authorEric Andersen1999-12-03 09:19:54 +0000
committerEric Andersen1999-12-03 09:19:54 +0000
commitb186d980d6060195d01048bb3a083739137b6c21 (patch)
treef64b2d63850be12ce3081b2000784aa57ac29656 /findutils/find.c
parent77619b9dda2b0550fea519fba05f7d9790ef7eaf (diff)
downloadbusybox-b186d980d6060195d01048bb3a083739137b6c21.zip
busybox-b186d980d6060195d01048bb3a083739137b6c21.tar.gz
Stuf
Diffstat (limited to 'findutils/find.c')
-rw-r--r--findutils/find.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c
index 0f1f5f1..40a508f 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -51,8 +51,15 @@ static int fileAction(const char *fileName, struct stat* statbuf)
{
if (pattern==NULL)
fprintf(stdout, "%s\n", fileName);
- else if (find_match((char*)fileName, pattern, TRUE) == TRUE)
- fprintf(stdout, "%s\n", fileName);
+ else {
+ char* tmp = strrchr( fileName, '/');
+ if (tmp == NULL)
+ tmp = (char*)fileName;
+ else
+ tmp++;
+ if (check_wildcard_match(tmp, pattern) == TRUE)
+ fprintf(stdout, "%s\n", fileName);
+ }
return( TRUE);
}