Fixed "rmdir -p" that got broken by rev. 1.15.
(This also fixes "rmdir -v /nonexistent".)
This commit is contained in:
parent
654ec77877
commit
d4af5f3250
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137901
@ -78,15 +78,14 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
for (errors = 0; *argv; argv++) {
|
for (errors = 0; *argv; argv++) {
|
||||||
if (pflag) {
|
if (rmdir(*argv) < 0) {
|
||||||
errors |= rm_path(*argv);
|
warn("%s", *argv);
|
||||||
|
errors = 1;
|
||||||
} else {
|
} else {
|
||||||
if (rmdir(*argv) < 0) {
|
|
||||||
warn("%s", *argv);
|
|
||||||
errors = 1;
|
|
||||||
}
|
|
||||||
if (vflag)
|
if (vflag)
|
||||||
printf("%s\n", *argv);
|
printf("%s\n", *argv);
|
||||||
|
if (pflag)
|
||||||
|
errors |= rm_path(*argv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user