Applied patch from Christophe Boyaniqu to remove double-slashes printed in

recursive_action.
This commit is contained in:
Mark Whitley 2001-03-07 17:27:04 +00:00
parent 26d53eb197
commit ae20128e9f

View File

@ -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);