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:
parent
c328bb90a7
commit
ce68da90ca
@ -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 == '/')
|
||||
|
Loading…
Reference in New Issue
Block a user