From ae20128e9f7a7d31629079068b04cf7119cc40df Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Wed, 7 Mar 2001 17:27:04 +0000 Subject: Applied patch from Christophe Boyaniqu to remove double-slashes printed in recursive_action. --- utility.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3