Fix the rmdir -p a/b/c/ case, where rmdir -p a/b/c works, and rmdir c/

works.

PR:		PR 6521
Submitted by:	Rudolf Cejka <xcejka00@dcse.fee.vutbr.cz>
Reviewed by:	eivind (in brief retrograde)
This commit is contained in:
nbm 2000-06-28 14:54:07 +00:00
parent c328bb90a7
commit ce68da90ca

View File

@ -96,6 +96,10 @@ rm_path(path)
{
char *p;
p = path + strlen(path);
while (--p > path && *p == '/')
;
*++p = '\0';
while ((p = strrchr(path, '/')) != NULL) {
/* Delete trailing slashes. */
while (--p > path && *p == '/')