Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-03-07 20:27:04 +0300
committerMark Whitley <markw@lineo.com>2001-03-07 20:27:04 +0300
commitae20128e9f7a7d31629079068b04cf7119cc40df (patch)
tree9ed4ce288d18b6f661403d43177f584032c8b0d0 /utility.c
parent26d53eb197c6c47c323c3772bfdbfe7f3906e881 (diff)
Applied patch from Christophe Boyaniqu to remove double-slashes printed in
recursive_action.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 0da98f13d..0ace3eb34 100644
--- a/utility.c
+++ b/utility.c
@@ -715,7 +715,10 @@ int recursive_action(const char *fileName,
return FALSE;
}
memset(nextFile, 0, sizeof(nextFile));
- sprintf(nextFile, "%s/%s", fileName, next->d_name);
+ if (fileName[strlen(fileName)-1] == '/')
+ sprintf(nextFile, "%s%s", fileName, next->d_name);
+ else
+ sprintf(nextFile, "%s/%s", fileName, next->d_name);
status =
recursive_action(nextFile, TRUE, followLinks, depthFirst,
fileAction, dirAction, userData);