diff options
author | Mark Whitley <markw@lineo.com> | 2001-03-07 17:27:04 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-03-07 17:27:04 +0000 |
commit | ae20128e9f7a7d31629079068b04cf7119cc40df (patch) | |
tree | 9ed4ce288d18b6f661403d43177f584032c8b0d0 | |
parent | 26d53eb197c6c47c323c3772bfdbfe7f3906e881 (diff) | |
download | busybox-w32-ae20128e9f7a7d31629079068b04cf7119cc40df.tar.gz busybox-w32-ae20128e9f7a7d31629079068b04cf7119cc40df.tar.bz2 busybox-w32-ae20128e9f7a7d31629079068b04cf7119cc40df.zip |
Applied patch from Christophe Boyaniqu to remove double-slashes printed in
recursive_action.
-rw-r--r-- | utility.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -715,7 +715,10 @@ int recursive_action(const char *fileName, | |||
715 | return FALSE; | 715 | return FALSE; |
716 | } | 716 | } |
717 | memset(nextFile, 0, sizeof(nextFile)); | 717 | memset(nextFile, 0, sizeof(nextFile)); |
718 | sprintf(nextFile, "%s/%s", fileName, next->d_name); | 718 | if (fileName[strlen(fileName)-1] == '/') |
719 | sprintf(nextFile, "%s%s", fileName, next->d_name); | ||
720 | else | ||
721 | sprintf(nextFile, "%s/%s", fileName, next->d_name); | ||
719 | status = | 722 | status = |
720 | recursive_action(nextFile, TRUE, followLinks, depthFirst, | 723 | recursive_action(nextFile, TRUE, followLinks, depthFirst, |
721 | fileAction, dirAction, userData); | 724 | fileAction, dirAction, userData); |